<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ``` $reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader('Xlsx'); # 打開文件、載入excel表格 $spreadsheet = $reader->load('1.xlsx'); # 獲取活動工作薄 $sheet = $spreadsheet->getActiveSheet(); # 獲取 單元格值 和 坐標 $cellC1 = $sheet->getCell('B2'); echo '值: ', $cellC1->getValue(),PHP_EOL; echo '坐標: ', $cellC1->getCoordinate(),PHP_EOL;//B2 // $sheet->setCellValue('B2','歐陽鋒'); # 獲取總列數 即從左至右顯示列的最后一個 $total_Column = $sheet->getHighestColumn(); dump($total_Column);//B # 列數 改為數字顯示 $total_ColumnIndex = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::columnIndexFromString($total_Column); dump( $total_ColumnIndex);//2 # 獲取總行數 $total_row = $sheet->getHighestRow(); dump($total_row);//3 $log = []; //$row_number=2 是排除地一行的標題 for($row_number=2; $row_number <= $total_row; $row_number++){ $title = $sheet->getCellByColumnAndRow(1,$row_number)->getValue(); $cat_fname = $sheet->getCellByColumnAndRow(2,$row_number)->getValue(); $cat_name = $sheet->getCellByColumnAndRow(3,$row_number)->getValue(); $price = $sheet->getCellByColumnAndRow(4,$row_number)->getValue(); $img = $sheet->getCellByColumnAndRow(5,$row_number)->getValue(); // $cat_fid = find('shop_cat','id','name="'.$cat_fname.'"'); // $cat_id = find('shop_cat','id','name="'.$cat_name.'"'); // getFieldValue('user','name'); $data = [ 'title' => $title, 'cat_fname'=>$cat_fname, 'cat_name'=>$cat_name, // 'cat_id' => $cat_id['id'], 'price' => $price, 'img' => $img, 'add_time' => time(), ]; dump('第'.$row_number.'條'); dump($data); //插入數據庫 // ... } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看