* cfg:
* formats
* name : [ Align : left, .... ]
- * workbook : nameof
- * close : array(
+ *
+ * workbook : nameof
+ *
+ * headdata : [
+ [ "a", "b" ]
+
+ e : f
+ ]
+ * cols : array(
array(
'header'=> "Thumbnail",
'dataIndex'=> 'id',
'width'=> 75,
'renderer' => array($this, 'getThumb')
),
+
+
+
+
*/
$worksheet =& $workbook->addWorksheet($cfg['workbook']);
$worksheet->setInputEncoding('UTF-8');
+
+
+ $start_row = 0;
+
+ if (!empty($cfg['head'])) {
+ foreach($cfg['head'] as $row) {
+ foreach($row as $c => $col) {
+ $worksheet->write($start_row, $c, $col);
+
+ }
+ $start_row++;
+ }
+ // add a spacer..
+ $start_row++;
+ }
+
+
+
+
+
+
+
+
foreach($cfg['cols'] as $c=>$col_cfg) {
$worksheet->write(0, $c, $col_cfg['header']);
$worksheet->setColumn ( $c, $c, $col_cfg['width'] / 5);