in reply to Writing to Spreadsheets in PERL...

From the Spreadsheet::WriteExcel manual page:
       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
So, if you want more than 32767 characters in a cell, Excel isn't the appropriate format.

Replies are listed 'Best First'.
Re^2: Writing to Spreadsheets in PERL...
by biswanath_c (Beadle) on May 10, 2010 at 14:23 UTC

    Thanks for the immediate reply... One of my friends was suggesting that i should write into XLSX files instead of XLS files to overcome this issue. Would you know anything about this? Would XLSX help me resolve this issue? How do I write into XLSX files from PERL?

      Have you tried searching CPAN for XLSX? Still, (Excel) Spreadsheets are for presenting tabular information. It makes no sense to put so much information into one cell.

      biswanath_c:

      If it's an Excel limitation, then you may be able to put the data into an XLSX file, but then Excel will probably complain when you try to load the spreadsheet.

      ...roboticus

        I'm not quite sure, but I think XLSX is a newer file format than the excel files that our beloved Perl module support, and newer versions of excel are said not to suffer from the same size limits.

        Still I agree that a database is more appropriate.

      No idea. All I know is that Spreadsheet::{Read|Write}Excel doesn't do XLSX files. I always send them back if $WORK gives me one.
      You might try Spreadsheet::WriteExcelXML which has the same API but fewer features than Spreadsheet::WriteExcel. The author recommends this module for exceeding the row limits imposed by .xls, perhaps you can exceed the character-cell limit also.

      Alternatively, if you have Excel 2007 you can use Win32::OLE and invoke Microsoft's API to make xlsx files.