PHP_XLSXWriter icon indicating copy to clipboard operation
PHP_XLSXWriter copied to clipboard

Format escaping broken

Open Troopster19 opened this issue 5 years ago • 1 comments

Using a style of : -$*`` #,##0.00-;-$* #,##0.00_-;-$* "-"??-;-@- gets converted in numberFormatStandardized to: -$*\ #,##0.00-;-$\ #,##0.00_-;_-$\ "-"??-;-@_- and causes slashes to be visible in the cell. Changing line 811 to $escaped.= $c; instead of $escaped.= "\".$c; fixed it.

Not sure what the intended purpose of escaping those characters was but it breaks custom formats.

Troopster19 avatar Jan 08 '20 21:01 Troopster19

XLSX is really just a zip of XML files. So when your write the numberFormat to XML you have to escape some characters to match excel. So I get that the escaping isn't working correctly for your format... but it would be interesting to see what your format looks like in the raw xml file within the xlsx file to see how it gets escaped.

mk-j avatar May 31 '23 22:05 mk-j