Top Description Fields Constructors Methods
org.apache.poi.ss

public final Enum SpreadsheetVersion

extends Enum<SpreadsheetVersion>
Class Inheritance
Imports
org.apache.poi.ss.util.CellReference

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.

Field Summary

Modifier and TypeField and Description
private final int
private final int
private final int
private final int
private final int
private final int
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
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

Constructor Summary

AccessConstructor and Description
private
SpreadsheetVersion(int maxRows, int maxColumns, int maxFunctionArgs, int maxCondFormats, int maxCellStyles, int maxText)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the last (maximum) valid column index, equals to getMaxColumns() - 1
getLastColumnIndex
()

public String

Returns:

the last valid column index in a ALPHA-26 representation (IV or XFD).
getLastColumnName
()

public int

Returns:

the last (maximum) valid row index, equals to getMaxRows() - 1
getLastRowIndex
()

public int

Returns:

the maximum number of cell styles per spreadsheet
getMaxCellStyles
()

public int

Returns:

the maximum number of usable columns in each spreadsheet
getMaxColumns
()

public int

Returns:

the maximum number of conditional format conditions on a cell
getMaxConditionalFormats
()

public int

Returns:

the maximum number arguments that can be passed to a multi-arg function (e.g. COUNTIF)
getMaxFunctionArgs
()

public int

Returns:

the maximum number of usable rows in each spreadsheet
getMaxRows
()

public int

Returns:

the maximum length of a text cell
getMaxTextLength
()

public static SpreadsheetVersion
public static SpreadsheetVersion[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

_maxCellStylesback to summary
private final int _maxCellStyles
_maxColumnsback to summary
private final int _maxColumns
_maxCondFormatsback to summary
private final int _maxCondFormats
_maxFunctionArgsback to summary
private final int _maxFunctionArgs
_maxRowsback to summary
private final int _maxRows
_maxTextLengthback to summary
private final int _maxTextLength
EXCEL2007back to summary
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
EXCEL97back to summary
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

Constructor Detail

SpreadsheetVersionback to summary
private SpreadsheetVersion(int maxRows, int maxColumns, int maxFunctionArgs, int maxCondFormats, int maxCellStyles, int maxText)

Method Detail

getLastColumnIndexback to summary
public int getLastColumnIndex()
Returns:int

the last (maximum) valid column index, equals to getMaxColumns() - 1

getLastColumnNameback to summary
public String getLastColumnName()
Returns:String

the last valid column index in a ALPHA-26 representation (IV or XFD).

getLastRowIndexback to summary
public int getLastRowIndex()
Returns:int

the last (maximum) valid row index, equals to getMaxRows() - 1

getMaxCellStylesback to summary
public int getMaxCellStyles()
Returns:int

the maximum number of cell styles per spreadsheet

getMaxColumnsback to summary
public int getMaxColumns()
Returns:int

the maximum number of usable columns in each spreadsheet

getMaxConditionalFormatsback to summary
public int getMaxConditionalFormats()
Returns:int

the maximum number of conditional format conditions on a cell

getMaxFunctionArgsback to summary
public int getMaxFunctionArgs()
Returns:int

the maximum number arguments that can be passed to a multi-arg function (e.g. COUNTIF)

getMaxRowsback to summary
public int getMaxRows()
Returns:int

the maximum number of usable rows in each spreadsheet

getMaxTextLengthback to summary
public int getMaxTextLength()
Returns:int

the maximum length of a text cell

valueOfback to summary
public static SpreadsheetVersion valueOf(String name)
valuesback to summary
public static SpreadsheetVersion[] values()