[R] Re: Importing Excel .xls into R
zivan.karaman at limagrain.com
Thu Dec 7 10:55:50 CET 2000
One can import data from Excel ODBC source, but of course it is user's
responsibility to ensure that the data are consistent. Each worksheet in the
Excel workbook can be accessed as a table (for example, for Sheet1, you should
type "select * from [Sheet1$]". The worksheet should have first row containing
the column names, and the data rows should follow (the data should be in the
form that is like in the output of write.table with column names). Using the
package RODBC version 0.7-2, the empty cells are NOT transformed to NA, but
there is a new version of RODBC available that I didn't try yet.
Douglas Bates <bates at stat.wisc.edu> le 06/12/2000 19:17:51
Pour : Alexandre Fayolle <Alexandre.Fayolle at logilab.fr>
cc : "Richard A. Bilonick" <rab at nauticom.net>, HAKIM Nour-Eddine
<noureddine.hakim at axa-corporatesolutions.com>, "'R-help at r-project.org'"
<R-help at r-project.org> (ccc : Zivan KARAMAN/LMGC/Limagrain)
Objet : Re: [R] Re: Importing Excel .xls into R
Alexandre Fayolle <Alexandre.Fayolle at logilab.fr> writes:
> On Wed, 6 Dec 2000, Richard A. Bilonick wrote:
> > I don't believe there is any direct way of doing this.
> Isn't is possible to access an Excell document via ODBC ?
I know you can go the other way and import a table from an ODBC
connection into an Excel spreadsheet. I did that recently.
For this kind of exchange Excel is the client on the ODBC connection.
I would be surprised if one were able to transfer data the other way
by making Excel function as an ODBC server. Excel doesn't seem to have
a way of enforcing consistency in the contents of cells in a column
and consistency in columns is important for many other systems that
can use ODBC connections. In some ways consistent storage and
interpretation for all the elements of a column is the defining
feature of a relational database table.
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