projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89009f7
)
SimpleExcel.php
author
Alan Knowles
<alan@roojs.com>
Mon, 26 Nov 2012 06:35:51 +0000
(14:35 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 26 Nov 2012 06:35:51 +0000
(14:35 +0800)
SimpleExcel.php
patch
|
blob
|
history
diff --git
a/SimpleExcel.php
b/SimpleExcel.php
index
2af11b2
..
814ca02
100644
(file)
--- a/
SimpleExcel.php
+++ b/
SimpleExcel.php
@@
-114,11
+114,22
@@
class Pman_Core_SimpleExcel extends Pman
-
-
+ foreach($cfg['cols'] as $c=>$col_cfg) {
+ if (is_string($col_cfg)) {
+ $cfg['cols'][$c] = array(
+ 'header' => $col_cfg,
+ 'dataIndex' => $col_cfg,
+ 'width' => 50,
+
+ );
+ }
+ }
foreach($cfg['cols'] as $c=>$col_cfg) {
+
+
+
$worksheet->write($start_row, $c, $col_cfg['header']);
$worksheet->setColumn ( $c, $c, $col_cfg['width'] / 5);