Skip to content

Commit

Permalink
Fixed boolean value set #154
Browse files Browse the repository at this point in the history
  • Loading branch information
Desire456 committed Jul 22, 2021
1 parent 533d845 commit a82b341
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
import java.util.regex.Matcher;

public class XlsxFormatter extends AbstractFormatter {
private static final String TRUE_AS_STRING = "1";
private static final String FALSE_AS_STRING = "0";

protected DocumentConverter documentConverter;
protected Document template;
protected Document result;
Expand Down Expand Up @@ -986,7 +989,7 @@ protected void updateCell(WorksheetPart worksheetPart, BandData bandData, Cell n
newCell.setV(formatValue(value, parameterName, fullParameterName));
} else if (value instanceof Boolean) {
newCell.setT(STCellType.B);
newCell.setV(String.valueOf(value));
newCell.setV((boolean) value ? TRUE_AS_STRING : FALSE_AS_STRING);
} else if (value instanceof Number) {
newCell.setT(STCellType.N);
newCell.setV(String.valueOf(value));
Expand Down

0 comments on commit a82b341

Please sign in to comment.