demo.php 496 B

1234567891011121314151617181920212223
  1. <?php
  2. require 'PHPExcelReader/PHPExcelReader.php';
  3. try{
  4. $Reader = new PHPExcelReader('test.xls');
  5. $total = $Reader->count(); // get the total rows of records
  6. //$current = $Reader->current(); // get the current row data
  7. /*
  8. $Reader->seek(4); // skip to the 4th row
  9. $row = $Reader->current(); // get the 4th row data
  10. */
  11. /*
  12. foreach($Reader as $key => $row){
  13. $data[] = $row; // loop obtain row data
  14. }
  15. */
  16. var_dump($total);
  17. } catch (Exception $e) {
  18. die($e->getMessage());
  19. }