$highestColumn = $sheet->getHighestColumn(); // 取得总列数
++$highestColumn;

for ($row = 5; $row <= $highestRow; $row++) {
    $rowData = array();
    for ($column = 'A'; $column != $highestColumn; $column++) {
        $columnData = $sheet->getCell($column . $row)->getValue();
    }        
}
两处改动:1、++$highestColumn;2、$column != $highestColumn;
$highestColumn = $sheet->getHighestColumn(); // 取得总列数
++$highestColumn;

for ($row = 5; $row <= $highestRow; $row++) {
    $rowData = array();
    for ($column = 'A'; $column != $highestColumn; $column++) {
        $columnData = $sheet->getCell($column . $row)->getValue();
    }        
}
两处改动:1、++$highestColumn;2、$column != $highestColumn;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2022-01-23
  • 2021-10-20
  • 2022-12-23
  • 2021-09-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
相关资源
相似解决方案