PHP_XLSXWriter_plus
PHP_XLSXWriter_plus copied to clipboard
Styles corrupted in excel 2013
Opening in excel 2013 the popup error shows...
We found a problem with some content in '....xlsx'. Do you want us to try to recover...
Problem is recovering the file strips all formatting, which sort of negates the reason for using this fork over XLSXWriter.
Any ideas, more than capable of fixing for you if you point me in the right direction.
ta
ohh forgot to mention, opens fine in libre office calc :\
line 288 fwrite($fd, '<fasmily val="2"/>') should be fwrite($fd, '<family val="2"/>')
lines 272 to 277 should be
if (isset($style['font']['name']) && !empty($style['font']['name'])) $this->fontName = $style['font']['name'];
if (isset($style['font']['size']) && !empty($style['font']['size'])) $this->fontSize = $style['font']['size'];
if (isset($style['font']['color']) && !empty($style['font']['color'])) $this->fontColor = $style['font']['color'];
if (isset($style['font']['bold']) && !empty($style['font']['bold'])) $this->fontStyles .= '<b/>';
if (isset($style['font']['italic']) && !empty($style['font']['italic'])) $this->fontStyles .= '<i/>';
if (isset($style['font']['underline']) && !empty($style['font']['underline'])) $this->fontStyles .= '<u/>';
line 287 should be
if ($this->fontName) fwrite($fd, ' <name val="'.$this->fontName.'"/>');
This now compiles and opens n libre office AND excel 2013
Would be nice to get these changes in place, this is an awesome tool and a nice fork giving needed features!