-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Description
I trying to genereate one xlsx file. with a fomrula in a cell a basic formula
=IF(I2="";"";CONCAT(I2;LEFT(T2;1)))
but when I open the excel the formula was changed to
=@if(I2="";"";CONCAT(I2;LEFT(T2;1)))
and the cell dont show anything until I manually remove the @
this is my code:
ws.formula(dataRowIndex,coluna.getXlsxColumnOrder(),xmlEscape(formula));
and the xmlEscape method
public static String xmlEscape(String input) {
if (input == null) {
return null;
}
// A ordem de substituição é importante para evitar substituições duplas
// Primeiro substituímos '&', para não "bagunçar" as substituições dos outros caracteres.
String escaped = input.replace("&", "&");
// Agora substituímos os demais.
escaped = escaped.replace("<", "<");
escaped = escaped.replace(">", ">");
escaped = escaped.replace("\"", """);
escaped = escaped.replace("'", "'");
return escaped;
}
Metadata
Metadata
Assignees
Labels
No labels