[R] Reading Excel files from within R.
cyg at sympatico.ca
Thu Jan 11 06:13:22 CET 2001
You already use the simplest method I can think of that is comma delimited
I think we'll probably never see this as part of R for obvious reasons but
what would be very nice is to have an ActiveX interface. That is the
possibility of creating an Ole object and using it's properties and methods.
The next best thing I can think of would be to use an intermediary DLL that
would create and use Ole objects (such as Excel) and transfer the data you
need and/or do whatever else you could think of. But it would be a lot of
work just to transfer data back and forth.
Maybe a much simpler approach would be to use a vbscript | jscript |
perl-script. Any of these is Ole aware and you could write an R function to
run your script which would extract the data you want, put it in a file that
R can read back. That is the quickest and easiest expedient you could use to
control everything from R.
B.E.F.P. Université du Québec à Montréal
cyg at sympatico.ca
> -----Message d'origine-----
> De : owner-r-help at stat.math.ethz.ch
> [mailto:owner-r-help at stat.math.ethz.ch]De la part de Alistair Merrifield
> Envoyé : Wednesday, January 10, 2001 10:12 PM
> À : 'r-help at lists.r-project.org'
> Objet : [R] Reading Excel files from within R.
> Dear all,
> I am interested in reading Excel spreadsheets (*.xls) directly
> into R (I am
> using version 1.1.1 at the moment). I have not had much luck so far.
> For the time being, I have been converting Excel files to comma delimited
> files (*.csv) and reading these into R (using commands such as
> This works well, but it would be more efficient if I could read the Excel
> files directly.
> I have noticed that there is an Excel interface for R. However, this seems
> to be a backwards approach to my problem . I would prefer to read
> Excel into
> R, not use R in Excel!
> I am sure this cannot be an uncommon thing to want to do (given that Excel
> is a popular programme), although I have not had much success searching in
> the CRAN archives for information. Any comments would be appreciated.
> Cheers, Al.
> Al Merrifield
> Energy Analyst
> Energy Modelling & Statistics
> Ministry of Economic Development
> PO Box 1473
> NEW ZEALAND
> Phone: (04) 470 2338
> Fax: (04) 473 9930
> E-mail: Alistair.Merrifield at med.govt.nz
> r-help mailing list -- Read
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help