I'm just new with PHPExcel. I've looked through documentation and would like to use PHPExcel to extract data from excel files (2007 xlsx format) to MySQL database.
I was able to do it with a small file (around 200 cells with data). But when i tried to parse large file - 25Mb program just fails on load method of PHPExcel_IOFactory class.
I would appreciate any suggestions how to troubleshoot this case or how to solve it.
My code is the following:
$objPHPExcel = PHPExcel_IOFactory::load("Final.xlsx");
foreach ($objPHPExcel->getWorksheetIterator() as $worksheet)
$worksheetTitle = $worksheet->getTitle();
$highestRow = $worksheet->getHighestRow();
$highestColumn = $worksheet->getHighestColumn();
$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);
echo "<br />Table: ".$worksheetTitle." ";
echo 'consists of ' . $highestColumnIndex . ' columns (A-' . $highestColumn . ') ';
echo ' and ' . $highestRow . ' rows.';
echo '<br />Data: <table border="1"><tr>';
for ($row = 1; $row <= $highestRow; ++ $row)
for ($col = 0; $col < $highestColumnIndex; ++ $col)
$cell = $worksheet->getCellByColumnAndRow($col, $row);
$val = $cell->getValue();
echo '<td>' . $val . '</td>';
thanks in advance.