I have the Problem that if I process more then one excel file in one process to html then the styles will be wrong.
I do like this:
class grid_xml2xls extends PHPExcel
... read xml and write into phpexcel
public function html() # html writer
$xls = & new grid_xml2xls($this->xml_grid(true));
$r1 = new report('x');
$r2 = new report('y');
I'm parsing a xml file an I store style definitions in an array. (a file can have 27.000 rows and 40 cols and many styles)
self::$used_styles[$used_styles_idX] = $this->sheet->getCell($current_col_cel)->getXfIndex(); // returns integer e.g. 5
the first html and style will be correct, but the second style will be wrong. There are elements from the first run (report) inside.
self::$used_styles[$used_styles_idX] = $current_col_cel; # remember the first cell with this style
this will be slower, but the styles are more correct, but not fine. Some styles will be wrong, too
Is there any caching/store/static array where phpexcel store the style information over the lifetime of an object?
I'm using 1.7.4 and now 1.7.5 with the same behavior.
I hope anywhere can help me, to solve this problem?