[R] Reading Excel files from within R.

M. Edward Borasky znmeb at borasky-research.com
Thu Jan 11 06:34:56 CET 2001


Try setting up an ODBC interface to your spreadsheet. In the Control Panel
(Win2K) open Administrative Tools, then Data Sources (ODBC). Select the File
DSN tab and do an ADD. You'll be able to attach a Data Source Name (DSN) to
your Excel spreadsheet. After you have this done, you'll be able to get data
from the spreadsheet with an ODBC query.

Then you need to install the R-ODBC package. I haven't done this part
myself, but I have done the other part that I just described. The R-ODBC
package will let you do queries against the ODBC name you just defined.
--
M. Edward Borasky
Borasky Research
http://www.borasky-research.com
mailto:znmeb at borasky-research.com

If there's nothing to astrology, how come so many famous men were born on
holidays?

> -----Original Message-----
> From: owner-r-help at stat.math.ethz.ch
> [mailto:owner-r-help at stat.math.ethz.ch]On Behalf Of Alistair Merrifield
> Sent: Wednesday, January 10, 2001 7:12 PM
> To: 'r-help at lists.r-project.org'
> Subject: [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
> "read.csv").
> 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
> Wellington
> NEW ZEALAND
>
> Phone: (04) 470 2338
> Fax:     (04) 473 9930
> E-mail: Alistair.Merrifield at med.govt.nz
>
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -.-.-.-.-.-.-
> 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 mailing list