org.apache.poi.ss
Class SpreadsheetVersion

java.lang.Object
  extended by org.apache.poi.ss.SpreadsheetVersion

public class SpreadsheetVersion
extends java.lang.Object

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.

Author:
Josh Micich, Yegor Kozlov

Field Summary
static SpreadsheetVersion EXCEL2007
          Excel2007 The total number of available columns is 16K (2^14) The total number of available rows is 1M (2^20) 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) Length of text cell contents is 32767
static SpreadsheetVersion EXCEL97
          Excel97 format aka BIFF8 The total number of available columns is 256 (2^8) The total number of available rows is 64k (2^16) The maximum number of arguments to a function is 30 Number of conditional format conditions on a cell is 3 Length of text cell contents is 32767
 
Method Summary
 int getLastColumnIndex()
           
 java.lang.String getLastColumnName()
           
 int getLastRowIndex()
           
 int getMaxColumns()
           
 int getMaxConditionalFormats()
           
 int getMaxFunctionArgs()
           
 int getMaxRows()
           
 int getMaxTextLength()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXCEL97

public static final SpreadsheetVersion EXCEL97
Excel97 format aka BIFF8


EXCEL2007

public static final SpreadsheetVersion EXCEL2007
Excel2007
Method Detail

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

getLastColumnName

public java.lang.String getLastColumnName()
Returns:
the last valid column index in a ALPHA-26 representation (IV or XFD).

getMaxTextLength

public int getMaxTextLength()
Returns:
the maximum length of a text cell