Bug in export to excel (excelHtml5)

Bug in export to excel (excelHtml5)

anishanish Posts: 9Questions: 5Answers: 0

If a cell contains a XML special character, like &, the export fails.
This fix is to escape the cell contents while creating the XML
The old code was

'<c t="inlineStr"><is><t>'+row[i]+'</t></is></c>'

The new code is as given below (I user underscore to escape)

'<c t="inlineStr"><is><t>'+_.escape(row[i])+'</t></is></c>'

Answers

  • anishanish Posts: 9Questions: 5Answers: 0

    Just to clarify - the xlsx file is created but Excel wont be able to open it

This discussion has been closed.