* 'dataFormat' => 'string' // to force a string..
'width'=> 75,
'renderer' => array($this, 'getThumb'),
+ 'txtrenderer' => array($this, 'cleanValue'), // for
* 'color' => 'yellow', // set color for the cell which is a header element
* 'fillBlank' => 'gray', // set the color for the cell which is a blank area
),
'leave_open' => false
+
+ // callbacks: renderer
+
+ function($value, $worksheet, $row, $col, $row_data)
+
+ // callbacks : txtrenderer
+ function($value, $worksheet, $row, $col, $row_data)
+
+
+
*/
$format = isset($col_cfg['color']) && isset($this->formats[$col_cfg['color']]) ? $this->formats[$col_cfg['color']] : false;
$worksheet->write($start_row, $c, @$col_cfg['header'],$format);
$worksheet->setColumn ( $c, $c, $col_cfg['width'] / 5);
+ $worksheet->setRow( $start_row, 100);
}
$start_row++;
$this->start_row = &$start_row;
foreach($cfg['cols'] as $c=>$col_cfg) {
if(isset($col_cfg['dataIndex']) && isset($cl[$col_cfg['dataIndex']])){
- $v = $cl[$col_cfg['dataIndex']];
+ $v = $cl[$col_cfg['dataIndex']] ;
+
}else{
if(isset($col_cfg['fillBlank'])){
$worksheet->write($start_row+$r, $c, '', $formats[$col_cfg['fillBlank']]);
continue;
}
- $v = @iconv('UTF-8', 'UTF-8//IGNORE', $v);
+ $v = @iconv('UTF-8', 'UTF-8//TRANSLIT//IGNORE', $v);
$dataFormat = empty($col_cfg['dataFormat']) ? '' : $col_cfg['dataFormat'];
- ;
-
+
$format = isset($col_cfg['format']) && isset($formats[$col_cfg['format']] ) ? $formats[$col_cfg['format']] : false;
// print_R(array($start_row+$r, $c, $v, $format));exit;