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

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

Hi,

I have been looking for an answer to my question but I cannot quite find it anywhere...

I have code that loads an Excel XLSX file into memory and then analyzes its content. However, when I load a very large file I run into the "Out of memory" error. Checking the Windows Task Manager I see that Perl is only using around 1GB and that there is memory left since my computer has 4GB of RAM. I have tried using the modules Spreadsheet::XLSX and SimpleXlsx but both run into the same issue. My question is: Is this 1GB limit a problem with Perl? Has anybody found the same issue? Is there a parameter that can be changed as the -Xmx in Java? A 32-bit OS should be able to handle all 4GB.

I have tried my code with both ActivePerl (version 5.16.2) and Strawberry Perl (version 5.16.2.1-32bit). My OS is Windows XP Professional 32-bit.

This is how I read the file with one module:

use SimpleXlsx; my($xlsx) = SimpleXlsx->new(); my($worksheets) = $xlsx->parse($file_name);

With the other module:

use Spreadsheet::XLSX; $excel = Spreadsheet::XLSX -> new ($file_name);