I'm somewhat perplexed by the behaviour of PHPExcel with some files I have. The files contain approx. 3000 rows of data, but according to PHPExcel, the last row used is 65535. I tried and cut a few lines from the file and pasted them into a fresh file, to no avail. It doesn't matter whether it is Excel5 or Excel2007 format, always the same result.
Any ideas to find the error 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 } ?>