Package org.apache.poi.ss.usermodel
Class ExcelNumberFormat
java.lang.Object
org.apache.poi.ss.usermodel.ExcelNumberFormat
Object to hold a number format index and string, for various formatting evaluations
-
Constructor Summary
ConstructorsConstructorDescriptionExcelNumberFormat
(int idx, String format) Use this carefully, prefer factory methods to ensure id/format relationships are not broken or confused. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExcelNumberFormat
from
(Cell cell, ConditionalFormattingEvaluator cfEvaluator) static ExcelNumberFormat
int
getIdx()
-
Constructor Details
-
ExcelNumberFormat
Use this carefully, prefer factory methods to ensure id/format relationships are not broken or confused. Left public soConditionalFormattingRule.getNumberFormat()
implementations can use it.- Parameters:
idx
- Excel number format index, either a built-in or a higher custom # mapped in the workbook style tableformat
- Excel number format string for the index
-
-
Method Details
-
from
- Parameters:
style
-- Returns:
- null if the style is null, instance from style data format values otherwise
-
from
- Parameters:
cell
- cell to extract format fromcfEvaluator
- 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
- Returns:
- Excel number format string for the index
-