Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ private Cell parseCell(int trackedColIndex) throws XMLStreamException {
}

if ("inlineStr".equals(type)) {
return parseInlineStr(addr);
return parseInlineStr(addr, formatId, formatString);
} else if ("s".equals(type)) {
return parseString(addr);
return parseString(addr, formatId, formatString);
} else {
return parseOther(addr, type, formatId, formatString);
}
Expand Down Expand Up @@ -278,7 +278,7 @@ private String shiftCell(String cellID, Integer dCol, Integer dRow) {
}


private Cell parseString(CellAddress addr) throws XMLStreamException {
private Cell parseString(CellAddress addr, final String formatId, final String formatString) throws XMLStreamException {
r.goTo(() -> r.isStartElement("v") || r.isEndElement("c"));
if (r.isEndElement("c")) {
return empty(addr, CellType.STRING);
Expand All @@ -292,14 +292,14 @@ private Cell parseString(CellAddress addr) throws XMLStreamException {
Object value = sharedStringValue;
String formula = null;
String rawValue = sharedStringValue;
return new Cell(workbook, CellType.STRING, value, addr, formula, rawValue);
return new Cell(workbook, CellType.STRING, value, addr, formula, rawValue, formatId, formatString);
}

private Cell empty(CellAddress addr, CellType type) {
return new Cell(workbook, type, "", addr, null, "");
}

private Cell parseInlineStr(CellAddress addr) throws XMLStreamException {
private Cell parseInlineStr(CellAddress addr, String formatId, String formatString) throws XMLStreamException {
Object value = null;
String formula = null;
String rawValue = null;
Expand All @@ -314,7 +314,7 @@ private Cell parseInlineStr(CellAddress addr) throws XMLStreamException {
}
}
CellType cellType = formula == null ? CellType.STRING : CellType.FORMULA;
return new Cell(workbook, cellType, value, addr, formula, rawValue);
return new Cell(workbook, cellType, value, addr, formula, rawValue, formatId, formatString);
}

private Optional<String> getArrayFormula(CellAddress addr) {
Expand Down