in reply to Spreadsheet::WriteExcel # of files limitation?


I can't replicate this bug. I tried the following program on Win98 with perl5.005 and on Linux with a variety of perls. In all cases it produced 100 files. Could you try it on your system?
#!/usr/bin/perl -wl use strict; use Spreadsheet::WriteExcel; my $filename = 'test001'; $|++; for (1..100) { my $workbook = Spreadsheet::WriteExcel->new($filename . '.xls +'); my $worksheet = $workbook->addworksheet(); $worksheet->write(0, 0, "Hi Excel!"); $workbook->close(); print "Writing file : ", $filename++; }

Perhaps you could send me a more detailed bug report with your OS, version of perl, version of Spreadsheet::WriteExcel and the program that is causing the problems (or the smallest possible program that demonstrates this behaviour).

--
John.

Replies are listed 'Best First'.
Re: Re: Spreadsheet::WriteExcel # of files limitation?
by tcdo6666 (Initiate) on Jul 17, 2002 at 17:57 UTC
    John,

    I am running win2k, perl 5.6.1.633, and version 0.37 of SS:WE. I tried just changing the max number of files from 100 to 1000 and encountered the same error after file number 502. I am writing to a networked drive on a unix machine. I also tried this on an NT machine, writing to a local drive (just to check whether this is a windows limitation) and encountered the same error as well after file number 502. My script was crashing on file 79 because I had more worksheets I think. So adding more worksheet will reduce when it errors. I also checked the total size of the xls files and it is not close to the 7mb limit I heard about.

    Please let me know if you encounter the same error

    Thanks,
    Toan

    PS: Great job writing this module by the way, a great tool.

      This is a bug.

      I tracked it down to a feature of File::Temp and the way that temp files are handled on Windows.

      It will be patched in version 0.38 of Spreadsheet::WriteExcel which is due for release in the next 2-3 weeks.

      If you need the modification before that I can send you a patch or you can roll back to version 0.36.

      Thanks for highlighting this.

      --
      John.