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 sheetError in .jnew("java/io/FileInputStream", file) : java.io.FileNotFoundException: Can someone tell me what is the problem? and how to solve it. Cheers, Ashz -- View this message in context: http://r.789695.n4.nabble.com/Xlsx-and-R-read-problem-tp2998304p2998304.html Sent from the R help mailing list archive at Nabble.com.
try library(RODBC) and odbcConnectExcel2007; it has worked for me. 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: > > Can someone tell me what is the problem? and how to solve it. > > Cheers, > Ashz > > -- > View this message in context: http://r.789695.n4.nabble.com/Xlsx-and-R-read-problem-tp2998304p2998304.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?
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