1 setReadDataOnly(true);22 $objPHPExcel = $objReader->load($filename);23 $objWorksheet = $objPHPExcel->getActiveSheet();24 $highestRow = $objWorksheet->getHighestRow(); //取得行数25 $highestColumn = $objWorksheet->getHighestColumn();26 $highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn); //取得列数27 $excelData = array();28 for ($row = 2; $row <= $highestRow; $row++) {29 for ($col = 0; $col < $highestColumnIndex; $col++) {30 $excelData[$row][] =$objWorksheet->getCellByColumnAndRow($col, $row)->getValue();31 }32 }33 return $excelData;34 }