Using Apache POI 3.10.1 (Java) I have an issue with POI replacing double quotes in a String with ". Excel cannot read this as it expects real double-quotes.
This:
cell.setCellFormula("IF(A2=\"TEST\";1;2)");
Becomes this in the sheet1.xml (opening the text.xlsx (as a zip) and looking in sheet1.xml):
<f>IF(A2="TEST";1;2)</f>
Excel throws an error about errors in the sheet. Writing the formula in Excel, I can see from the XML that it expects this:
<f>IF(A2="TEST";1;2)</f>
I cannot seem to find anybody that has had a similar issue. Does anybody know if this is a bug or me doing something wrong?
"
into"e;
is something normally done by the XML library, at a lower level than Apache POI. Have you tried with other JVMs / other XML libraries / etc? – Gagravarr