<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## php第三方庫: * PHPExcel * [**php_xlsxwriter**](https://gitee.com/mirrors/php_xlsxwriter) [php_xlsxwriter](https://gitee.com/mirrors/php_xlsxwriter "php_xlsxwriter")例子; ``` //writer 類 $writer = new XLSXWriter(); //文件名 $filename = "example.xlsx"; //設置 header,用于瀏覽器下載 header('Content-disposition: attachment; filename="'.XLSXWriter::sanitize_filename($filename).'"'); header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); header('Content-Transfer-Encoding: binary'); header('Cache-Control: must-revalidate'); header('Pragma: public'); //導出的數據 $string = array ( 0 => array ( 'payc_bill_time' => '2017-07-12 16:40:44', 'payt_received_date' => '2017-07-12', 'ci_name' => '租金', 'payt_num' => 'YRZB(2012)A0047', 'payt_scsr_name' => '李巧紅', 'payt_received' => '300.00', 'paytd_type' => '現金', 'emp_name' => '鄭振標', ), 1 => array ( 'payc_bill_time' => '2017-07-12 16:39:55', 'payt_received_date' => '2017-07-12', 'ci_name' => '租金', 'payt_num' => 'YRZB(2012)A0046', 'payt_scsr_name' => '22222', 'payt_received' => '45.00', 'paytd_type' => '現金', 'emp_name' => '鄭振標', ), ... ... ); //每列的標題頭 $title = array ( 0 => '開單時間', 1 => '收款時間', 2 => '開票項目', 3 => '票據編號', 4 => '客戶名稱', 5 => '實收金額', 6 => '收款方式', 7 => '收款人', ); //工作簿名稱 $sheet1 = 'sheet1'; //對每列指定數據類型,對應單元格的數據類型 foreach ($title as $key => $item){ $col_style[] = $key ==5 ? 'price': 'string'; } //設置列格式,suppress_row: 去掉會多出一行數據;widths: 指定每列寬度 $writer->writeSheetHeader($sheet1, $col_style, ['suppress_row'=>true,'widths'=>[20,20,20,20,20,20,20,20]] ); //寫入第二行的數據,順便指定樣式 $writer->writeSheetRow($sheet1, ['xxx財務報表'], ['height'=>32,'font-size'=>20,'font-style'=>'bold','halign'=>'center','valign'=>'center']); /*設置標題頭,指定樣式*/ $styles1 = array( 'font'=>'宋體','font-size'=>10,'font-style'=>'bold', 'fill'=>'#eee', 'halign'=>'center', 'border'=>'left,right,top,bottom'); $writer->writeSheetRow($sheet1, $title,$styles1); // 最后是數據,foreach寫入 foreach ($data as $value) { foreach ($value as $item) { $temp[] = $item; } $rows[] = $temp; unset($temp); } $styles2 = ['height'=>16]; foreach($rows as $row){ $writer->writeSheetRow($sheet1, $row,$styles2); } //合并單元格,第一行的大標題需要合并單元格 $writer->markMergedCell($sheet1, $start_row=0, $start_col=0, $end_row=0, $end_col=7); //輸出文檔 $writer->writeToStdOut(); exit(0); ```
                  <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>

                              哎呀哎呀视频在线观看