http://www.perlmonks.org?node_id=912728

ketanh has asked for the wisdom of the Perl Monks concerning the following question:

I'm using Spreadsheet::XLSX to parse some reasonably big excel workbooks. They're in the ~5MB range.

I'm not really having any trouble with the reading/writing itself, but just opening up the .xlsm into perl takes ~30seconds. To compare, the same workbook opens with win32::ole in ~4seconds on my windows machine. I'm using the commands as specified by the CPAN Spreadsheet::XLSX module description.

use Text::Iconv; my $converter = Text::Iconv -> new ("utf-8", "windows-1251"); use Spreadsheet::XLSX; my $InFileName = shift @ARGV or die "no input file specified"; chomp (my $excelLocS = $InFileName); my $excel = Spreadsheet::XLSX -> new ($InFileName) or die "file does n +ot exist";

I did verify that the speed has a dependency on how much data there is in the workbook. I've wrapped time commands around the one line my "$excel =.." and made sure that's the bottleneck.

Would appreciate advice on what (if anything) I could do different here to speed up the initial load of these bigger files.