/** * Get the index of the number format (numFmt) record used by this cell format. * * @return the index of the number format */ public static long getNumberFormatIndex(Cell _cell) { Styles stylesPart = _cell.getWorksheetPart().getWorkbookPart().getStylesPart(); CTXf xf = stylesPart.getXfByIndex(_cell.getS()); if (xf == null) { throw new RuntimeException("xf unexpectedly null"); } log.debug("Using NumFmtId " + xf.getNumFmtId()); return xf.getNumFmtId(); //(short)_cellXf.getNumFmtId(); }
/** * Get the index of the number format (numFmt) record used by this cell format. * * @return the index of the number format */ public static long getNumberFormatIndex(Cell _cell) { Styles stylesPart = _cell.getWorksheetPart().getWorkbookPart().getStylesPart(); CTXf xf = stylesPart.getXfByIndex(_cell.getS()); if (xf == null) { throw new RuntimeException("xf unexpectedly null"); } log.debug("Using NumFmtId " + xf.getNumFmtId()); return xf.getNumFmtId(); //(short)_cellXf.getNumFmtId(); }
CellStyle cellStyle = new CellStyle(ctCellStyle.getXfId(), ctCellStyle.getName(), xf.getNumFmtId(), xf.getFontId(), xf.getFillId(), for (CTXf xf : ctCellXfs.getXf()) { CellXfs cellXfs = new CellXfs(xf.getXfId(), xf.getNumFmtId(), xf.getFontId(), xf.getFillId(),
CellStyle cellStyle = new CellStyle(ctCellStyle.getXfId(), ctCellStyle.getName(), xf.getNumFmtId(), xf.getFontId(), xf.getFillId(), for (CTXf xf : ctCellXfs.getXf()) { CellXfs cellXfs = new CellXfs(xf.getXfId(), xf.getNumFmtId(), xf.getFontId(), xf.getFillId(),