/** * Returns the format string, eg $##.##, for the given number format index. * * @param formatIndex the format index * * @return the format string */ public String getFormatString(int formatIndex) { String format = null; if (formatIndex >= HSSFDataFormat.getNumberOfBuiltinBuiltinFormats()) { FormatRecord tfr = _customFormatRecords.get(Integer.valueOf(formatIndex)); if (tfr == null) { logger.log( POILogger.ERROR, "Requested format at index " + formatIndex + ", but it wasn't found"); } else { format = tfr.getFormatString(); } } else { format = HSSFDataFormat.getBuiltinFormat((short) formatIndex); } return format; }
public String getFormatString(int formatIndex) { if (formatIndex < 0) { return null; } String format; if (formatIndex >= HSSFDataFormat.getNumberOfBuiltinBuiltinFormats() || customFormats.get(formatIndex) != null) { format = customFormats.get(formatIndex).getFormatString(); } else { format = HSSFDataFormat.getBuiltinFormat((short) formatIndex); } return format; }
/** * Returns the format string, eg $##.##, for the given number format index. */ public String getFormatString(int formatIndex) { String format = null; if (formatIndex >= HSSFDataFormat.getNumberOfBuiltinBuiltinFormats()) { FormatRecord tfr = _customFormatRecords.get(Integer.valueOf(formatIndex)); if (tfr == null) { System.err.println("Requested format at index " + formatIndex + ", but it wasn't found"); } else { format = tfr.getFormatString(); } } else { format = HSSFDataFormat.getBuiltinFormat((short) formatIndex); } return format; }
@Override public String getDataFormatString() { int formatIndex = getDataFormat(); if (formatIndex < 0) { return null; } String format; if (formatIndex >= HSSFDataFormat.getNumberOfBuiltinBuiltinFormats() || formats.get(formatIndex) != null) { format = formats.get(formatIndex).getFormatString(); } else { format = HSSFDataFormat.getBuiltinFormat((short) formatIndex); } return format; }
/** * Returns the format string, eg $##.##, for the given number format index. */ public String getFormatString(int formatIndex) { String format = null; if (formatIndex >= HSSFDataFormat.getNumberOfBuiltinBuiltinFormats()) { FormatRecord tfr = _customFormatRecords.get(Integer.valueOf(formatIndex)); if (tfr == null) { logger.log( POILogger.ERROR, "Requested format at index " + formatIndex + ", but it wasn't found"); } else { format = tfr.getFormatString(); } } else { format = HSSFDataFormat.getBuiltinFormat((short) formatIndex); } return format; }
/** * Returns the format string, eg $##.##, for the given number format index. * * @param formatIndex the format index * * @return the format string */ public String getFormatString(int formatIndex) { String format = null; if (formatIndex >= HSSFDataFormat.getNumberOfBuiltinBuiltinFormats()) { FormatRecord tfr = _customFormatRecords.get(Integer.valueOf(formatIndex)); if (tfr == null) { logger.log( POILogger.ERROR, "Requested format at index " + formatIndex + ", but it wasn't found"); } else { format = tfr.getFormatString(); } } else { format = HSSFDataFormat.getBuiltinFormat((short) formatIndex); } return format; }