org.apache.poi.ss
Enum SpreadsheetVersion

java.lang.Object
  extended by java.lang.Enum<SpreadsheetVersion>
      extended by org.apache.poi.ss.SpreadsheetVersion
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SpreadsheetVersion>

public enum SpreadsheetVersion
extends java.lang.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.

Author:
Josh Micich, Yegor Kozlov

Enum Constant Summary
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
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()
           
static SpreadsheetVersion valueOf(java.lang.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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

EXCEL97

public static final SpreadsheetVersion EXCEL97
Excel97 format aka BIFF8


EXCEL2007

public static final SpreadsheetVersion EXCEL2007
Excel2007
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(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - 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

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


Copyright 2012 The Apache Software Foundation or its licensors, as applicable.