$worksheet->setRow($start_row +$r, $cfg['row_height']);
}
- foreach($cfg['cols'] as $c=>$col_cfg) {
+ $line_height = (isset($cfg['line_height'])) ? $cfg['line_height'] : 12;
+ $height = 0;
+
+ foreach($cfg['cols'] as $c => $col_cfg) {
if(isset($col_cfg['dataIndex']) && isset($cl[$col_cfg['dataIndex']])){
- $v = 'xx' . @iconv("UTF-8", "UTF-8//IGNORE", $cl[$col_cfg['dataIndex']]) . 'xx';
+ $v = $cl[$col_cfg['dataIndex']] ;
}else{
if(isset($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'];
$worksheet->write($start_row+$r, $c, $v, $format);
}
+
+ if(isset($col_cfg['autoHeight'])){
+ $vv = explode("\n", $v);
+ $height = MAX(count($vv) * $line_height, $height);;
+ $worksheet->setRow($start_row+$r, $height);
+ }
}
$this->start_row++;
}
require_once 'File/Convert.php';
+ //var_Dump($this->outfile2);
$fc= new File_Convert($this->outfile2, "application/vnd.ms-excel");
- $fn = $fc->convert("application/vnd.ms-excel");
+ $fn = $fc->convert("application/vnd.ms-excel");
+ //print_r($fc);
$fc->serve('attachment',$fname); // can fix IE Mess
}