projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0496038
)
SimpleExcel.php
author
Edward
<edward@roojs.com>
Mon, 9 Feb 2015 09:27:43 +0000
(17:27 +0800)
committer
Edward
<edward@roojs.com>
Mon, 9 Feb 2015 09:27:43 +0000
(17:27 +0800)
SimpleExcel.php
patch
|
blob
|
history
diff --git
a/SimpleExcel.php
b/SimpleExcel.php
index
bd14f80
..
31e3152
100644
(file)
--- a/
SimpleExcel.php
+++ b/
SimpleExcel.php
@@
-299,7
+299,7
@@
class Pman_Core_SimpleExcel extends Pman
$worksheet->setRow($start_row +$r, $cfg['row_height']);
}
$worksheet->setRow($start_row +$r, $cfg['row_height']);
}
- foreach($cfg['cols'] as $c
=>
$col_cfg) {
+ foreach($cfg['cols'] as $c
=>
$col_cfg) {
if(isset($col_cfg['dataIndex']) && isset($cl[$col_cfg['dataIndex']])){
$v = $cl[$col_cfg['dataIndex']] ;
if(isset($col_cfg['dataIndex']) && isset($cl[$col_cfg['dataIndex']])){
$v = $cl[$col_cfg['dataIndex']] ;
@@
-343,6
+343,14
@@
class Pman_Core_SimpleExcel extends Pman
$worksheet->write($start_row+$r, $c, $v, $format);
}
$worksheet->write($start_row+$r, $c, $v, $format);
}
+
+ if(isset($col_cfg['autoHeight'])){
+ $vv = explode("\n", $v);
+
+ $height = count($vv) * 20;
+
+ $worksheet->write($start_row+$r, $height);
+ }
}
$this->start_row++;
}
$this->start_row++;