[R] Excel *.xls files, RODBC
ggrothendieck at myway.com
Sun Dec 5 19:48:20 CET 2004
: Date: Sun, 5 Dec 2004 10:35:46 -0600
: From: Dirk Eddelbuettel <edd at debian.org>
: To: Gabor Grothendieck <ggrothendieck at myway.com>
: Cc: <r-help at stat.math.ethz.ch>
: Subject: Re: [R] Excel *.xls files, RODBC
: On Sun, Dec 05, 2004 at 12:58:19PM +0000, Gabor Grothendieck wrote:
: > Rolf Turner <rolf <at> math.unb.ca> writes:
: > :
: > : I gather from reading the back-issues of r-help that it should be
: > : possible (modulo a number of caveats) to read an excel (yuck!) file
: > : into R using RODBC. I have obtained and installed ODBC and the RODBC
: > : package, but cannot for the life of me figure out how to go about
: > : it. Can anyone give me a simple recipe?
: > :
: > : I have an excel file on cdrom, say:
: > :
: > : /mnt/cdrom/melvin.xls
: > :
: > : I have started R and loaded the RODBC package. I want to create
: > : a data frame ``melvin'' by reading in /mnt/cdrom/melvin.xls.
: > : What (in monosyllables --- step by step) do I do next?
: > The xlhtml program at
: > http://freshmeat.net/projects/xlhtml/
: > can not only convert .xls to .html but also to .csv using something
: > like:
: > xlhtml -te -xc:1-10 -csv
: AFAIK there are about three main strands of tools to deal with this in a
: manner that is platform-independent:
: -- Perl based on SpreadSheet::ReadExcel and OLE::StorageLite, which Greg has
: wrapped up nicely in gdata, a component of the gregmisc bundle
: -- C based libraries also used in Gnumeric, and, for that matter, also as a
: loadable module for GNU Gretl -- someone ambitious could add this to the
: foreign package; this may make for a nice term project. OpenOffice may have
: its own code base.
: -- Apache/Jakarta/POI based, which I know little of, but Whit just told us
: that he has something in the works there
: I think all three of these are maintained (in fact, I look after the Perl
: and Gretl ones for Debian). Where does xlhtml fit in? The code seems to be
: C based -- it this a split of the Gnumeric code? Have there been updates
: since 2002?
Its been a while since I actually used it myself. I
use Windows where we have lots of ways to interface to Excel.
There once was an xlhtml.org address and the home page still
exists but now its at sourceforge.
Reviewing the code or posting to the Yahoo Groups xlhml list
(see the link on the xlhtml home page) is your best bet
for questions. Their list seems to have been taken over by
spam recently but there were some real messages during the
summer so you might get a reply. Of course, there is also
More information about the R-help