[R] Xlsx and R -read problem

Gabor Grothendieck ggrothendieck at gmail.com
Sat Oct 16 21:06:42 CEST 2010


On Sat, Oct 16, 2010 at 10:17 AM, ashz <ashz at walla.co.il> wrote:
>
> Hi,
>
> I have an excel 2007 file located in C:\know and called try.xlsx.
>
> Whan I try to read it I get this error:
>
>> file <- system.file("know", "try.xlsx", package = "xlsx")
>> res <- read.xlsx(file, 2)  # read the second sheet
> Error in .jnew("java/io/FileInputStream", file) :
>  java.io.FileNotFoundException:
>

Try:

File <- file.path("c:", "know", "try.xlsx"); File
res <- read.xlsx(File, 2)

or

setwd("c:/know")
res <- read.xlsx("try.xlsx", 2)


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list