shensong00 7 godzin temu
rodzic
commit
618030e1cc
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/Console/Commands/Test.php

+ 1 - 1
app/Console/Commands/Test.php

@@ -79,7 +79,7 @@ class Test extends Command
79 79
     public function importData() {
80 80
         $file = public_path('测试.xlsx');
81 81
         $objPHPExcel = \PHPExcel_IOFactory::load($file);
82
-        $sheet = $objPHPExcel->getSheet('非销售'); // 读取第一个工作表
82
+        $sheet = $objPHPExcel->getSheet(0); // 读取第一个工作表
83 83
 //        $highestRow = $sheet->getHighestRow(); // 取得总行数
84 84
         for ($row = 3; $row <= 3; $row ++) { // 行数是以第1行开始
85 85
             echo 'A: ' . trim($sheet->getCell('A' . $row)->getFormattedValue()).PHP_EOL;