Re: [R] Is it possible to create highly customized report in *.xlsformat by using R/S+?

From: Whit Armstrong <>
Date: Thu 21 Jul 2005 - 03:09:30 EST

It _does_ do formatting:

write.xls(x,"matrixFromR_formatted3.xls","matrix",formats=rep("#,##0.0;[ Red]#-##0.0;\"\"",nc))

And also writes multiple sheets to a workbook (I didn't post all the examples).

I need those features for the reports I generate, but if the perl module has the same features, then I'm happy to contribute to a solution for Greg's package that would use perl instead. The R -> C++ -> Java -> file method is a huge pain.

On the other hand, there may be no reason to continue to work on this project as MS has suggested that it will use xml formats for the next version of office:

btw, here's the list of alternatives suggested by the POI team:

fyi, here is the project homepage:


-----Original Message-----
[] On Behalf Of Dirk Eddelbuettel Sent: Wednesday, July 20, 2005 11:53 AM
Subject: Re: [R]Is it possible to create highly customized report in *.xlsformat by using R/S+?

Whit Armstrong <whit <at>> writes:
> I have a package which I use to create excel files from R.
> I have not been able to produce a configure script general enough for
> me to post it to cran, but I will send it to you if you like.
> I use it for production jobs on our linux servers. You may have to
> tinker a bit to get it to compile on windows.
> Have a look at the examples below. If it suits your needs, I will
> send it to you.

Looks straightforward, but does not fancy-pants formatting. If that is sufficient, could one not borrow Greg's approach from read.xls() [ in package gdata, part of the unbundled gregmisc bundle ] and create a simpler write.xls() that uses Perl's SpreadSheet::WriteExcel to write xls files -- just like Greg uses the related SpreadSheet::ReadExcel to read xls files ? That way you avoid the configure hassles of the Java module you use here [ if I recall correctly, you borrowed this from an Apache sub-project, no ? ]

Cheers, Dirk mailing list PLEASE do read the posting guide! mailing list PLEASE do read the posting guide! Received on Thu Jul 21 03:06:06 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:53 EST