private void handleNonStringCell(StringBuilder text, Cell cell, DataFormatter formatter) { CellType type = cell.getCellType(); if (type == CellType.FORMULA) { type = cell.getCachedFormulaResultType(); } if (type == CellType.NUMERIC) { CellStyle cs = cell.getCellStyle(); if (cs != null && cs.getDataFormatString() != null) { String contents = formatter.formatRawCellContents( cell.getNumericCellValue(), cs.getDataFormat(), cs.getDataFormatString()); checkMaxTextSize(text, contents); text.append(contents); return; } } // No supported styling applies to this cell String contents = ((XSSFCell)cell).getRawValue(); if (contents != null) { checkMaxTextSize(text, contents); text.append(contents); } }
value = getFormattedDate(cell); } else { value += cell.getRawValue();
private void mapCellOnNode(XSSFCell cell, Node node, STXmlDataType.Enum outputDataType) { String value =""; switch (cell.getCellType()) { case XSSFCell.CELL_TYPE_STRING: value = cell.getStringCellValue(); break; case XSSFCell.CELL_TYPE_BOOLEAN: value += cell.getBooleanCellValue(); break; case XSSFCell.CELL_TYPE_ERROR: value = cell.getErrorCellString(); break; case XSSFCell.CELL_TYPE_FORMULA: value = cell.getStringCellValue(); break; case XSSFCell.CELL_TYPE_NUMERIC: value += cell.getRawValue(); break; default: ; } if (node instanceof Element) { Element currentElement = (Element) node; currentElement.setTextContent(value); } else { node.setNodeValue(value); } }
} else { if(cell instanceof XSSFCell){ cellValue = ((XSSFCell)cell).getRawValue(); break;
} else { if(cell instanceof XSSFCell){ cellValue = ((XSSFCell)cell).getRawValue(); break;
} else { if (cell instanceof XSSFCell) { cellValue = ((XSSFCell) cell).getRawValue(); break;
} else { if (cell instanceof XSSFCell) { cellValue = ((XSSFCell) cell).getRawValue(); break;
private void handleNonStringCell(StringBuffer text, Cell cell, DataFormatter formatter) { int type = cell.getCellType(); if (type == Cell.CELL_TYPE_FORMULA) { type = cell.getCachedFormulaResultType(); } if (type == Cell.CELL_TYPE_NUMERIC) { CellStyle cs = cell.getCellStyle(); if (cs.getDataFormatString() != null) { text.append(formatter.formatRawCellContents( cell.getNumericCellValue(), cs.getDataFormat(), cs.getDataFormatString() )); return; } } // No supported styling applies to this cell XSSFCell xcell = (XSSFCell)cell; text.append( xcell.getRawValue() ); }
private void handleNonStringCell(StringBuilder text, Cell cell, DataFormatter formatter) { CellType type = cell.getCellType(); if (type == CellType.FORMULA) { type = cell.getCachedFormulaResultType(); } if (type == CellType.NUMERIC) { CellStyle cs = cell.getCellStyle(); if (cs != null && cs.getDataFormatString() != null) { String contents = formatter.formatRawCellContents( cell.getNumericCellValue(), cs.getDataFormat(), cs.getDataFormatString()); checkMaxTextSize(text, contents); text.append(contents); return; } } // No supported styling applies to this cell String contents = ((XSSFCell)cell).getRawValue(); if (contents != null) { checkMaxTextSize(text, contents); text.append(contents); } }
value = getFormattedDate(cell); } else { value += cell.getRawValue();