Using the PHPExcel library, I am attempting to iterate over around 1500 rows, each row has about 25 columns.
I am using this code (taken from PHPExcel runs out of 256, 5
For version 1.7.6 and below, Christopher Mullins has written a patch that allows you to read worksheet information before reading the entire file. This information includes the row and column counts for each worksheet, so you could use this to retrieve the rowcount before "chunk reading" the actual workbook data.
This patch has now been incorporated into the latest SVN code, so in the future it will be part of the PHPExcel core.
I would normally do this:
$objPHPExcel = $objReader->load($inputFileName);
$rows = count($objPHPExcel->getActiveSheet()->toArray());
for ($start_row = 1; $start_row < $rows; $start_row ++)
// ...
$excel->getActiveSheet()->toArray()
will only return each row (with data) in an array.