Some background: Spreadsheet::WriteExcel creates a temporary file for
each worksheet and workbook. This helps to greatly reduce the amount
of memory required by S::WE and increases the speed substantially.
Question: Is there a limitation in the number of sheet in a single
workbook?
Not from Spreadsheet::WriteExcel. However, there is generally a system
limit on the maximum number of open files and this will in turn
impose a limit of the number of temporary files that the module can
use. If a temporary file cannot be created then the module falls back
to storing the data in memory. If you have warnings turned on in your
program then you should see a warning message about this. (Note: there is
also a memory limit in Excel as pointed out by Jason above but that is
a separate issue).
Question: Does Spreadsheet-WriteExcel keeps those temporary files
opened 'til the end.
Yes. S::WE needs to know the final size of each Worksheet
before it can merge them into a workbook.
Question: What may explain that the final workbook be empty when *no*
error is detected by the both Spreadsheet-WriteExcel package and my
Perl program?
I'd suspect that you've exceeded S::WE's 7MB limit. Again "-w" or "use warnings" should
tell you if this is happening. Try using Spreadsheet::WriteExcel::Big instead (just
change the use and new() statements in your program).
John.
--