When importing a Google Sheets-exported .xlsx file in PHPExcel, PHPexcel methods $worksheet->getHighestDataColumn()
and $worksheet->getHighestDataRow()
both return the maximum set in Google Docs, including completely empty cells, which is usually 26x1000.
The cells are just as empty as regular empty Excel cells as far as I can tell, when opening them in Google Sheets/Excel, i.e. no spaces.
Maybe Google Sheets uses a slightly different approach to "reserving" columns and rows than Excel (which generates them on the fly).
I would like to get the highest non-empty row, so that I don't allocate lots of memory unnecessarily when looping over rows. Respecting the format that I'm using, I can save some evaluation in empty rows, but in the end, I'm forced to simply loop over all rows and checking whether all cells are empty.