[R] import Excel file ?

Pfaff, Bernhard Bernhard.Pfaff at drkw.com
Tue Apr 20 16:48:32 CEST 2004


> 
> Good afternoon,
> 
> I would like to know how can I import Excel files in R ? Do I have to 
> transform them in text files (.txt) ?
> Thank you

Hello Emilie,

two possibilities come to my mind:

1) Save your execl file as csv and use read.csv()

2) Use the contributed package "RODBC"
library(RODBC)
chan <- odbcConnectExcel("Path to your Excel file")
your.df <- sqlFetch(chan, "name of your data sheet")
close(chan)

and of course, last but not least, consult the manual: R Data Import/Export

HTH,
Bernhard
> 
> Emilie Haon-Lasportes
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 


--------------------------------------------------------------------------------
The information contained herein is confidential and is inte...{{dropped}}




More information about the R-help mailing list