Skip to content

read file of EXCEL format

5 messages · Chuck Cleland, Sean Davis, Brian Ripley +2 more

#
XinMeng wrote:
Here is one way to read it directly:

library(RODBC)

z <- odbcConnectExcel("d:/data.xls")
       mydata <- sqlFetch(z, "Sheet1")
       close(z)

# Replace Sheet1 with the name of the worksheet to be read.
#
http://cran.r-project.org/doc/manuals/R-data.html#Reading-Excel-spreadsheets
On 2/23/06 8:49 AM, "XinMeng" <xmeng at capitalbio.com> wrote:

            
Reading the manual is quite helpful for such things:

http://cran.r-project.org/doc/manuals/R-data.html#Reading-Excel-spreadsheets

Sean
#
Please see the 'R Data Import/Export Manual' which ships with every copy 
of R.
On Thu, 23 Feb 2006, XinMeng wrote:

            

        
PLEASE do!
#
Hello sir:

How can I read data file of EXCEL format from disk("d:\\data.XLS" for example)?

I can only read data file of .txt format
read.delim("d:\\data.txt",header=T,as.is=T),but only EXCEL format is available at present.


Thanks a lot
#
hi, hi all,

there are several possibilities to import data in Excel format.
you can use the fonctions "odbcConnectExcel","read.xls", ...
(see http://cran.r-project.org/doc/manuals/R-data.html)

require(RODBC)
?odbcConnect

library(gdata)
?read.xls


regards,


P.BADY



Selon XinMeng <xmeng at capitalbio.com>:
--------------------------------------------------------------------------
Ce message a ??t?? envoy?? depuis le webmail IMP (Internet Messaging Program)