php - Efficient way to use PHPExcel_Reader_IReadFilter -
all code samples i've found in documentation , bundled examples suggest in order use phpexcel_reader_ireadfilter
interface in phpexcel have start file processing scratch on every iteration:
$objreader = phpexcel_iofactory::createreader($inputfiletype); $chunksize = 2048; $chunkfilter = new chunkreadfilter(); $objreader->setreadfilter($chunkfilter); ($startrow = 2; $startrow <= 65536; $startrow += $chunksize) { $chunkfilter->setrows($startrow,$chunksize); $objphpexcel = $objreader->load($inputfilename); // <-------- :-? }
i don't need fancy processing. want grab data store somewhere else. there short-cut can take?
then don't read file using read filter.... 1 option people limited memory need work large files, or need read subset of cells spreadsheet. you're not obliged use read filters, can load whole file if have sufficient memory.
another option if you're limited in memory use cell caching; or set readdataonly if don't need style information
Comments
Post a Comment