Question

I'm using PHPExcel library.

My excel file is very large to process and save to db.

Is there any way to split excel file by weight (ex: 100 MB) and then process each of split files?

Was it helpful?

Solution

There isn't a way to split by specific byte sizes; but there are documented methods for reading a file in "chunks" - see section 4.3 entitled "Reading Only Specific Columns and Rows from a File (Read Filters)" of the PHPExcel User documentation for reading spreadsheet files for an explanation and example code.

You also don't mention if you are using cell caching to reduce memory usage; but that is described in section 4.2.1 entitled Cell Caching of the developer documentation, and also intended to reduce the memory footprint of large files

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top