<?php require ('Classes\PHPExcel.php'); $reader = new PHPExcel_Reader_Excel2007(); $excel = $reader->load("test.xlsx"); $sheet = $excel->getActiveSheet(); for ($i=0; $i <=20 ; $i++) { echo $sheet->getCell("A" . $i)->getValue() . "<br>"; } $sheet = null; $excel = null; $reader = null; ?>
原始資料:
讀取資料:
參考資料:
https://phpexcel.codeplex.com/
PHPExcel developer documentation
https://github.com/PHPOffice/PHPExcel/wiki/User%20Documentation