SimpleExcel.php
[Pman.Core] / SimpleExcel.php
index 7e3172f..3c73fff 100644 (file)
@@ -299,8 +299,10 @@ class Pman_Core_SimpleExcel extends Pman
             $worksheet->setRow($start_row +$r, $cfg['row_height']);
         }
         
-        foreach($cfg['cols']  as $c=>$col_cfg) {
-            print_r($col_cfg);exit;
+        $height = 20;
+        
+        foreach($cfg['cols']  as $c => $col_cfg) {
+            
             if(isset($col_cfg['dataIndex']) && isset($cl[$col_cfg['dataIndex']])){
                 $v =    $cl[$col_cfg['dataIndex']]  ;
                 
@@ -343,6 +345,13 @@ class Pman_Core_SimpleExcel extends Pman
           
                 $worksheet->write($start_row+$r, $c, $v, $format);
             }
+            
+//            if(isset($col_cfg['autoHeight'])){
+                $vv = explode("\n", $v);
+                print_R($vv);exit;
+                $height = MAX(count($vv) * 20, $height);;
+                $worksheet->setRow($start_row+$r, $height);
+//            }
         }
         $this->start_row++;