[R] convert *.xls to text

Duncan Murdoch dmurdoch at pair.com
Tue Mar 30 19:45:42 CEST 2004


On Tue, 30 Mar 2004 11:02:23 -0500, Whit Armstrong
<Whit.Armstrong at tudor.com> wrote :

>Has anyone looked into using the Jakarta POI to save R data directly to xls
>format?
>
>http://jakarta.apache.org/poi/index.html
>
>One of the advantages of POI over the DCOM interface is that one could use
>unix/linux platforms to generate excel files / reports.
>
>I would be interested in collaborating with anyone who has a serious
>interest in building an R package for this purpose.

It's much easier to write Excel compatible files than it is to read
them, because you only need to be able to handle a small subset of the
possibilities:  you can skip formulas, graphs, etc.

This should be relatively easy to do using the connection code.  You
can probably find sufficient documentation of the format on
wotsit.org, or from OpenOffice or POI.  Those sources are generally
somewhat obsolete (MS likes to keep updating the format), but for
output purposes they should be fine.

I think it would be preferable to do this all in R, rather than mixing
R and Java, if the goals were relatively modest.  If you want full
read/write access, then it would make more sense to rely on someone
else's work (e.g. POI or ODBC).

Duncan Murdoch




More information about the R-help mailing list