Package org.apache.poi.ss
Enum Class SpreadsheetVersion
- All Implemented Interfaces:
Serializable
,Comparable<SpreadsheetVersion>
,Constable
This enum allows spreadsheets from multiple Excel versions to be handled by the common code.
Properties of this enum correspond to attributes of the spreadsheet that are easily discernable to the user. It is not intended to deal with low-level issues like file formats.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionExcel2007 The total number of available rows is 1M (2^20) The total number of available columns is 16K (2^14) The maximum number of arguments to a function is 255 Number of conditional format conditions on a cell is unlimited (actually limited by available memory in Excel) Number of cell styles is 64000 Length of text cell contents is 32767Excel97 format aka BIFF8 The total number of available rows is 64k (2^16) The total number of available columns is 256 (2^8) The maximum number of arguments to a function is 30 Number of conditional format conditions on a cell is 3 Number of cell styles is 4000 Length of text cell contents is 32767 -
Method Summary
Modifier and TypeMethodDescriptionint
int
int
int
int
int
int
int
static SpreadsheetVersion
Returns the enum constant of this class with the specified name.static SpreadsheetVersion[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXCEL97
Excel97 format aka BIFF8- The total number of available rows is 64k (2^16)
- The total number of available columns is 256 (2^8)
- The maximum number of arguments to a function is 30
- Number of conditional format conditions on a cell is 3
- Number of cell styles is 4000
- Length of text cell contents is 32767
-
EXCEL2007
Excel2007- The total number of available rows is 1M (2^20)
- The total number of available columns is 16K (2^14)
- The maximum number of arguments to a function is 255
- Number of conditional format conditions on a cell is unlimited (actually limited by available memory in Excel)
- Number of cell styles is 64000
- Length of text cell contents is 32767
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getMaxRows
public int getMaxRows()- Returns:
- the maximum number of usable rows in each spreadsheet
-
getLastRowIndex
public int getLastRowIndex()- Returns:
- the last (maximum) valid row index, equals to
getMaxRows() - 1
-
getMaxColumns
public int getMaxColumns()- Returns:
- the maximum number of usable columns in each spreadsheet
-
getLastColumnIndex
public int getLastColumnIndex()- Returns:
- the last (maximum) valid column index, equals to
getMaxColumns() - 1
-
getMaxFunctionArgs
public int getMaxFunctionArgs()- Returns:
- the maximum number arguments that can be passed to a multi-arg function (e.g. COUNTIF)
-
getMaxConditionalFormats
public int getMaxConditionalFormats()- Returns:
- the maximum number of conditional format conditions on a cell
-
getMaxCellStyles
public int getMaxCellStyles()- Returns:
- the maximum number of cell styles per spreadsheet
-
getLastColumnName
- Returns:
- the last valid column index in a ALPHA-26 representation
(
IV
orXFD
).
-
getMaxTextLength
public int getMaxTextLength()- Returns:
- the maximum length of a text cell
-