作者 刘朕
1 个管道 的构建 通过 耗费 1 秒

数据导出调试

@@ -144,7 +144,7 @@ class TestController extends HomeBaseController @@ -144,7 +144,7 @@ class TestController extends HomeBaseController
144 // $data2 = $tz->field('type',true)->select(); 144 // $data2 = $tz->field('type',true)->select();
145 //print_r($data2);exit(); 145 //print_r($data2);exit();
146 //填充表格信息 146 //填充表格信息
147 - for ($i = 3; $i <= count($data2) + 1; $i++) { 147 + for ($i = 3; $i <= count($data2) + 2; $i++) {
148 $j = 0; 148 $j = 0;
149 foreach ($data2[$i - 3] as $key => $value) { 149 foreach ($data2[$i - 3] as $key => $value) {
150 $excel->getActiveSheet()->setCellValue("$letter[$j]$i", "$value"); 150 $excel->getActiveSheet()->setCellValue("$letter[$j]$i", "$value");