| @@ 26-29 (lines=4) @@ | ||
| 23 | $keys = array_shift($data); |
|
| 24 | $rowCount = count($data); |
|
| 25 | $colCount = count($keys); |
|
| 26 | for($i = 0; $i < $colCount; $i++) |
|
| 27 | { |
|
| 28 | $sheat->setCellValueByColumnAndRow($i, 1, $keys[$i]); |
|
| 29 | } |
|
| 30 | for($i = 0; $i < $rowCount; $i++) |
|
| 31 | { |
|
| 32 | for($j = 0; $j < $colCount; $j++) |
|
| @@ 32-35 (lines=4) @@ | ||
| 29 | } |
|
| 30 | for($i = 0; $i < $rowCount; $i++) |
|
| 31 | { |
|
| 32 | for($j = 0; $j < $colCount; $j++) |
|
| 33 | { |
|
| 34 | $sheat->setCellValueByColumnAndRow($j, (2 + $i), $data[$i][$j]); |
|
| 35 | } |
|
| 36 | } |
|
| 37 | $writerType = 'Excel5'; |
|
| 38 | if(strcasecmp($type, 'xlsx') === 0 || strcasecmp($type, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') === 0) |
|