in reply to Out of Memory while using Spreadsheet::XLSX

You don't say whether you run out of memory (1) as soon as the file is parsed at:
my $excel = Spreadsheet::XLSX->new($in_file);

..or (2) if you are running out of memory while you are saving every row of each sheet to an array.

If it's the first case, then there was a start at writing a new XLSX parser, but work on it has stopped. It does work, though it is in a sort of alpha state, so you can try that.

If it's the second case, then don't do that.

Replies are listed 'Best First'.
Re^2: Out of Memory while using Spreadsheet::XLSX
by Anonymous Monk on Jul 11, 2014 at 05:54 UTC

    Hi all, glad to have all the responses from all you guys :). I'm using ParserExcel for .xls files but this is unable to parse .xlsx files. So I'm using Spreadsheet::XLSX. I have decided to use this module after a lot of R&D, this was the only way I found out which worked for me, but after testing this on large files it takes hell lot of memory for files of 5MB. Is there any way to minimize it as there is cell_handler in ParseExcel??

      Hi runring, I'm really so sorry I didn't get what you said...Could you please explain it?

        Which part don't you get? And are you actually running out of memory, or just using a lot of memory? Yes, this library uses a lot of memory on large files, nothing you can do about it, no CellHandler or any such thing. But you are saving rows of the file to an array. If you're running out of memory, at what point in the program are you running out?