Highest Row

Topics: Developer Forum, User Forum
Feb 21, 2015 at 3:28 PM
Hi sorry for english , i have a sheet with about 1900 rows . I create a script to insert values in db , if the record are too many , i must insert 500 record for time. to do this automatically i must know how many record are in the woorksheet .
I use this function :

echo 'Number of Record '. $objPHPExcel->getActiveSheet()->getHighestRow();

but the result is :

Number of Record 65536

Why ?
Coordinator
Feb 21, 2015 at 3:38 PM
getHighestRow() returns the highest row that contains "something" in the worksheet, not necessarily content. That "something" might (for example) be a reference in print settings or style settings. If you need the highest row that contains actual data in cells, then use the getHighestDataRow() method. Note, however, that a cell that contains a NULL value or an empty string or a single space is a cell with valid content.
Feb 22, 2015 at 12:38 PM
getHighestDataRow() return 85 .....