I am writing data into excel spreadhseet using the Spreadsheet::WriteExcel module. I noticed that looks like the API $sheet->write($row, $col, $data) does not write data into the spreadsheet immediately; instead PERL stores all the data in memory and only flushes them into the spreadsheet during probably the invocation of the $workbook->close API or the end of the program. Because of this, after sometime, my program crashes giving the "Out of Memory!" error.
Can anyone help me resolve this issue? Is it possible to flush the data into the spreadsheet whenever required?"