SimpleExcel.php
[Pman.Core] / SimpleExcel.php
index 31e3152..b6b5f41 100644 (file)
@@ -299,6 +299,8 @@ class Pman_Core_SimpleExcel extends Pman
             $worksheet->setRow($start_row +$r, $cfg['row_height']);
         }
         
+        $height = (isset($cfg['line_height'])) ? $cfg['line_height'] : 12;
+        
         foreach($cfg['cols']  as $c => $col_cfg) {
             
             if(isset($col_cfg['dataIndex']) && isset($cl[$col_cfg['dataIndex']])){
@@ -344,13 +346,12 @@ class Pman_Core_SimpleExcel extends Pman
                 $worksheet->write($start_row+$r, $c, $v, $format);
             }
             
-            if(isset($col_cfg['autoHeight'])){
+//            if(isset($col_cfg['autoHeight'])){
                 $vv = explode("\n", $v);
                 
-                $height = count($vv) * 20;
-                
-                $worksheet->write($start_row+$r, $height);
-            }
+                $height = MAX(count($vv) * 12, $height);;
+                $worksheet->setRow($start_row+$r, $height);
+//            }
         }
         $this->start_row++;