org.apache.poi.ss.usermodel
Class ExcelNumberFormat
java.lang.Object
   org.apache.poi.ss.usermodel.ExcelNumberFormat
org.apache.poi.ss.usermodel.ExcelNumberFormat
- public class ExcelNumberFormat 
- extends java.lang.Object
Object to hold a number format index and string, for various formatting evaluations
| Constructor Summary | 
| ExcelNumberFormat(int idx,
                  java.lang.String format)Use this carefully, prefer factory methods to ensure id/format relationships are not broken or confused.
 | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
ExcelNumberFormat
public ExcelNumberFormat(int idx,
                         java.lang.String format)
- Use this carefully, prefer factory methods to ensure id/format relationships are not broken or confused.
 Left public so ConditionalFormattingRule.getNumberFormat()implementations can use it.
 
- Parameters:
- idx- Excel number format index, either a built-in or a higher custom # mapped in the workbook style table
- format- Excel number format string for the index
 
from
public static ExcelNumberFormat from(CellStyle style)
- 
- Parameters:
- style-
- Returns:
- null if the style is null, instance from style data format values otherwise
 
from
public static ExcelNumberFormat from(Cell cell,
                                     ConditionalFormattingEvaluator cfEvaluator)
- 
- Parameters:
- cell- cell to extract format from
- cfEvaluator- ConditionalFormattingEvaluator to use, or null if none in this context
- Returns:
- number format from highest-priority rule with a number format, or the cell style, or null if none of the above apply/are defined
 
getIdx
public int getIdx()
- 
- Returns:
- Excel number format index, either a built-in or a higher custom # mapped in the workbook style table
 
getFormat
public java.lang.String getFormat()
- 
- Returns:
- Excel number format string for the index