Package org.apache.poi.ss
Enum SpreadsheetVersion
- java.lang.Object
-
- java.lang.Enum<SpreadsheetVersion>
-
- org.apache.poi.ss.SpreadsheetVersion
-
- All Implemented Interfaces:
Serializable
,Comparable<SpreadsheetVersion>
public enum SpreadsheetVersion extends Enum<SpreadsheetVersion>
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.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description 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 32767EXCEL97
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
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLastColumnIndex()
String
getLastColumnName()
int
getLastRowIndex()
int
getMaxCellStyles()
int
getMaxColumns()
int
getMaxConditionalFormats()
int
getMaxFunctionArgs()
int
getMaxRows()
int
getMaxTextLength()
static SpreadsheetVersion
valueOf(String name)
Returns the enum constant of this type with the specified name.static SpreadsheetVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EXCEL97
public static final SpreadsheetVersion 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
public static final SpreadsheetVersion 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 Detail
-
values
public static SpreadsheetVersion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SpreadsheetVersion c : SpreadsheetVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SpreadsheetVersion valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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
public String 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
-
-