[R] WriteXLS problem

David Winsemius dwinsemius at comcast.net
Tue Sep 7 02:56:56 CEST 2010


On Sep 6, 2010, at 8:09 PM, Dejian Zhao wrote:

> The maximum number of rows in excel 2003 or below is 65535, less  
> than your number of rows, so if you export your data into "xls"  
> files, probably you cannot see all your data in excel. Exel 2007 can  
> hold as many as 1048575 lines, thus "xlsx" file is a better choice.

The maximum number of rows in more editions of Excel.2003 was  
increased to a million. You may be correct about the Perl module that  
underlies WriteXLS, however. Here is an extract from the CPAN page for  
that module:

http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel/lib/Spreadsheet/WriteExcel.pm#LIMITATIONS

LIMITATIONS
The following limits are imposed by Excel:

Description Limit ----------------------------------- ------
  Maximum number of chars in a string 32767
  Maximum number of columns 256
  Maximum number of rows 65536
  Maximum chars in a sheet name 31
  Maximum chars in a header/footer 254
The minimum file size is 6K due to the OLE overhead. The maximum file  
size is approximately 7MB (7087104 bytes) of BIFF data. This can be  
extended by installing Takanori Kawai's OLE::Storage_Lite module http://search.cpan.org/search?dist=OLE-Storage_Lite 
  see the bigfile.pl example in the examples directory of the distro.

-- 
David


>
>
>
> On 2010-9-7 0:03, Kenneth Roy Cabrera Torres wrote:
>> Hi R users:
>>
>> I don't know if you have had the following problem trying to
>> export to an "xls" format file in a non windows platform.
>>
>> I try to use the following packages:
>> 1. dataframes2xls (version 0.4.4) (with phyton 2.7 and 3.1)
>> 2. WriteXLS (version 1.9.0) (with perl and testPerl working)
>>
>> Even "xlsx" package that take too long and do not finish.
>>
>> The data frame I try to export has 269363 row and 116 columns.
>> In the first one (dataframe2xls) I get this message:
>>
>> Traceback (most recent call last):
>>  File
>> "C:/PROGRA~2/R/R-211~1.1PA/library/dataframes2xls/python/csv2xls.py",
>> line 18, in<module>
>> import pyexcelerator
>> File
>> "C:\PROGRA~2\R\R-211~1.1PA\library\dataframes2xls\python 
>> \pyexcelerator
>> \__init__.py",
>> line 12, in<module>      from Workbook import Workbook
>> File
>> "C:\PROGRA~2\R\R-211~1.1PA\library\dataframes2xls\python 
>> \pyexcelerator
>> \Workbook.py",
>> line 526     boundsheets_len +=  
>> len(BIFFRecords.BoundSheetRecord(0x00L,
>> sheet.hidden, sheet.name).get())
>>                                                             ^
>> SyntaxError: invalid syntax
>>
>> Using the second option I get this message:
>>
>> Error en get(as.character(i)),envr=envir) :
>>   objeto '00000000089' no encontrado
>>
>> Object '00000000089' not found.
>>
>> Im using this R platform:
>> sessionInfo()
>> R version 2.11.1 Patched (2010-08-30 r52848)
>> Platform: x86_64-unknown-linux-gnu (64-bit)
>>
>> Locale:
>> LC_CTYPE=es_CO.UTF-8
>>
>> Is the only solution to export to ".csv" and then
>> to ".xls" format with other program like openoffice?
>>
>> Thank you for your help and advice.
>>
>> Kenneth
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list