Hello everyone, What is the simplest, most RELIABLE way to import data from MS EXCEL (.xls) format to R? In the past I have used the read.xls() function from the xlsReadWrite package, however, I have been wrestling with it all afternoon long with no success. I continue to receive the following error message:> {widge<-read.xls("F:\\Classes\\Z1.Data\\stat.3010\\WidgeOne.xls",+ colNames=TRUE,sheet=1)} Error in .Call("ReadXls", file, colNames, sheet, type, from, rowNames, : Incorrect number of arguments (11), expecting 10 for 'ReadXls' Any insight/suggestions/assistance is appreciated. Thank you, Dan [[alternative HTML version deleted]]
Ken Hutchison
2011-Aug-24 22:27 UTC
[R] Fwd: Importing data from MS EXCEL (.xls) to R XXXX
---------- Forwarded message ---------- From: Ken Hutchison <vicvoncastle@gmail.com> Date: Wed, Aug 24, 2011 at 6:27 PM Subject: Re: [R] Importing data from MS EXCEL (.xls) to R XXXX To: Dan Abner <dan.abner99@gmail.com> save as csv. ?read.csv Ken On Wed, Aug 24, 2011 at 6:20 PM, Dan Abner <dan.abner99@gmail.com> wrote:> Hello everyone, > > What is the simplest, most RELIABLE way to import data from MS EXCEL (.xls) > format to R? In the past I have used the read.xls() function from the > xlsReadWrite package, however, I have been wrestling with it all afternoon > long with no success. I continue to receive the following error message: > > > > {widge<-read.xls("F:\\Classes\\Z1.Data\\stat.3010\\WidgeOne.xls", > + colNames=TRUE,sheet=1)} > Error in .Call("ReadXls", file, colNames, sheet, type, from, rowNames, : > Incorrect number of arguments (11), expecting 10 for 'ReadXls' > > Any insight/suggestions/assistance is appreciated. > > Thank you, > > Dan > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. >[[alternative HTML version deleted]]
Hi Dan, You might try require(gdata) ?read.xls HTH, Jorge On Wed, Aug 24, 2011 at 6:20 PM, Dan Abner <> wrote:> Hello everyone, > > What is the simplest, most RELIABLE way to import data from MS EXCEL (.xls) > format to R? In the past I have used the read.xls() function from the > xlsReadWrite package, however, I have been wrestling with it all afternoon > long with no success. I continue to receive the following error message: > > > > {widge<-read.xls("F:\\Classes\\Z1.Data\\stat.3010\\WidgeOne.xls", > + colNames=TRUE,sheet=1)} > Error in .Call("ReadXls", file, colNames, sheet, type, from, rowNames, : > Incorrect number of arguments (11), expecting 10 for 'ReadXls' > > Any insight/suggestions/assistance is appreciated. > > Thank you, > > Dan > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. >[[alternative HTML version deleted]]
I agree with Ken.. if you can, save it as a CSV file. But if you have a bunch of these, then it isn't very efficient. I use read.xlsx() from the package "xlsx". I notice that you are using the full path.. have you tried changing directories?... I find it is best to compartmentalize my work and (with a few exceptions) work within a folder. good luck. Dan Abner wrote:> > Hello everyone, > > What is the simplest, most RELIABLE way to import data from MS EXCEL > (.xls) > format to R? In the past I have used the read.xls() function from the > xlsReadWrite package, however, I have been wrestling with it all afternoon > long with no success. I continue to receive the following error message: > > >> {widge<-read.xls("F:\\Classes\\Z1.Data\\stat.3010\\WidgeOne.xls", > + colNames=TRUE,sheet=1)} > Error in .Call("ReadXls", file, colNames, sheet, type, from, rowNames, : > Incorrect number of arguments (11), expecting 10 for 'ReadXls' > > Any insight/suggestions/assistance is appreciated. > > Thank you, > > Dan > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. >-- View this message in context: http://r.789695.n4.nabble.com/Importing-data-from-MS-EXCEL-xls-to-R-XXXX-tp3766864p3767063.html Sent from the R help mailing list archive at Nabble.com.