X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=SimpleExcel.php;h=31e3152b82595eab8c013a6ab07c1366523ddf9b;hb=80eeb96a861abf2506e02ffe38b48571ba68a7ed;hp=bd14f80d1de555c9123ecc25f476e50e86514b60;hpb=0496038d52ad47efb21b33d1ec01dfb10bab11ad;p=Pman.Core diff --git a/SimpleExcel.php b/SimpleExcel.php index bd14f80d..31e3152b 100644 --- a/SimpleExcel.php +++ b/SimpleExcel.php @@ -299,7 +299,7 @@ class Pman_Core_SimpleExcel extends Pman $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']] ; @@ -343,6 +343,14 @@ class Pman_Core_SimpleExcel extends Pman $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++;