diff --git a/application/download/controller/Excel.php b/application/download/controller/Excel.php index 4f24bf1..56707bb 100644 --- a/application/download/controller/Excel.php +++ b/application/download/controller/Excel.php @@ -9,6 +9,7 @@ use PhpOffice\PhpSpreadsheet\Style\Border; use PhpOffice\PhpSpreadsheet\Style\Fill; use PhpOffice\PhpSpreadsheet\Style\Alignment; use PhpOffice\PhpSpreadsheet\Style\Color; +use PhpOffice\PhpSpreadsheet\Cell\DataType; class Excel extends Controller { @@ -118,7 +119,7 @@ class Excel extends Controller // } // 修改后的代码(强制文本格式) - use PhpOffice\PhpSpreadsheet\Cell\DataType; // 确保顶部已引入 + // use PhpOffice\PhpSpreadsheet\Cell\DataType; // 确保顶部已引入 foreach ($data as $rowIndex => $rowData) { for ($colIndex = 0; $colIndex < $columnCount; $colIndex++) {