SimpleExcel.php
authorAlan Knowles <alan@roojs.com>
Thu, 6 Dec 2012 07:23:06 +0000 (15:23 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 6 Dec 2012 07:23:06 +0000 (15:23 +0800)
SimpleExcel.php

index 4c9edd4..16b44ab 100644 (file)
@@ -105,6 +105,11 @@ class Pman_Core_SimpleExcel extends Pman
         if (!empty($cfg['head'])) {
             foreach($cfg['head'] as $row) { 
                 foreach($row as $c => $col) {
+                    if (is_array($col)) {
+                        $worksheet->write($start_row, $c, $col[0], $col[1]);
+                        continue;
+                    }
+                    
                     $worksheet->write($start_row, $c, $col);
                     
                 }
@@ -199,6 +204,10 @@ class Pman_Core_SimpleExcel extends Pman
             foreach($cfg['foot'] as $row) { 
                 foreach($row as $c => $col) {
                     // if it's an array? - formated ???
+                    if (is_array($col)) {
+                        $worksheet->write($start_row, $c, $col[0], $col[1]);
+                        continue;
+                    }
                     $worksheet->write($start_row, $c, $col);
                     
                 }