255,258c255,276
< CellType cellType = cell.getCellTypeEnum();
< switch (cellType) {
< case BLANK: {
< _out.write('>');
---
>
> if (cell.getCellTypeEnum() == CellType.BLANK) {
> _out.write('>');
> return;
> }
>
> CellType valueType = cell.getCellTypeEnum() == CellType.FORMULA ? cell.getCachedFormulaResultTypeEnum() : cell.getCellTypeEnum();
>
> switch (valueType) {
> case BLANK:
> throw new IllegalStateException("this should never happen");
> case FORMULA:
> throw new IllegalStateException("this should never happen");
> case STRING:
> if (_sharedStringSource != null) {
> writeAttribute("t", STCellType.S.toString());
> } else {
> writeAttribute("t", "s");
> }
> break;
> case NUMERIC: {
> writeAttribute("t", "n");
261,276c279,284
< case FORMULA: {
< _out.write(">");
< outputQuotedString(cell.getCellFormula());
< _out.write("");
< switch (cell.getCachedFormulaResultTypeEnum()) {
< case NUMERIC:
< double nval = cell.getNumericCellValue();
< if (!Double.isNaN(nval)) {
< _out.write("");
< _out.write(Double.toString(nval));
< _out.write("");
< }
< break;
< default:
< break;
< }
---
> case BOOLEAN: {
> writeAttribute("t", "b");
> break;
> }
> case ERROR: {
> writeAttribute("t", "e");
278a287,304
> default: {
> throw new IllegalStateException("Invalid cell type: " + valueType);
> }
> }
>
> _out.write('>');
>
> if(cell.getCellTypeEnum() == CellType.FORMULA) {
> _out.write("");
> outputQuotedString(cell.getCellFormula());
> _out.write("");
> }
>
> switch (valueType) {
> case BLANK:
> throw new IllegalStateException("this should never happen");
> case FORMULA:
> throw new IllegalStateException("this should never happen");
283,285c309
<
< writeAttribute("t", STCellType.S.toString());
< _out.write(">");
---
> _out.write("");
289,294c313
< writeAttribute("t", "inlineStr");
< _out.write(">");
---
> _out.write("");
296c315
< _out.write("");
---
> _out.write("");
301,302c320
< writeAttribute("t", "n");
< _out.write(">");
---
> _out.write("");
308,309c326
< writeAttribute("t", "b");
< _out.write(">");
---
> _out.write("");
316,318c333
<
< writeAttribute("t", "e");
< _out.write(">");
---
> _out.write("");
324c339
< throw new IllegalStateException("Invalid cell type: " + cellType);
---
> throw new IllegalStateException("Invalid cell type: " + valueType);
443c458
<
---
>