php-read-excel

load($excel_file);
$sheet = $obj_php_excel->getSheet(0);
$highest_row = $sheet->getHighestRow();
$highest_column = $sheet->getHighestColumn();
var_dump($highest_row, $highest_column);
// 获取一行的数据
$data = [];
for ($row = 2; $row <= $highest_row; $row++){
// Read a row of data into an array
    $row_data = $sheet->rangeToArray('A' . $row . ':' . $highest_column . $row, NULL, TRUE, FALSE);
    // 
}
  • https://github.com/PHPOffice/PHPExcel/

你可能感兴趣的:(php-read-excel)