I am somewhat puzzled by the behavior of PHPExcel with some of the files that I have. Files contain approx. 3000 lines of data, but according to PHPExcel, the last line used is 65535. I tried and cut a few lines from a file and inserted them into a new file, but to no avail. It doesn't matter if the format is Excel5 or Excel2007, always the same result.
Any ideas to find a mistake here?
CODE:
$cr=$xls->getActiveSheet()->getHighestRow();
$cn=PHPExcel_Cell::columnIndexFromString($xls->getActiveSheet()->getHighestColumn());
for ($z=2; $z<=$cr; $z++) {
$class=($z%2)?"odd":"even";
?>
<tr class="<?php echo $class; ?>">
<?php for ($s=0; $s<$cn; $s++) {
$tmp=$xls->getActiveSheet()->getCellByColumnAndRow($s,$z)->getValue();?>
<td><?php echo $tmp; ?></td>
<?php } ?> </tr>
<?php } ?>
source
share