Top Description Inners Fields Constructors Methods
org.apache.poi.hssf.usermodel

public final Class HSSFEvaluationWorkbook

extends Object
implements FormulaRenderingWorkbook, EvaluationWorkbook, FormulaParsingWorkbook
Class Inheritance
All Implemented Interfaces
org.apache.poi.ss.formula.FormulaParsingWorkbook, org.apache.poi.ss.formula.EvaluationWorkbook, org.apache.poi.ss.formula.FormulaRenderingWorkbook
Annotations
@Internal
Imports
org.apache.poi.hssf.model.InternalWorkbook, org.apache.poi.hssf.record.NameRecord, org.apache.poi.hssf.record.aggregates.FormulaRecordAggregate, org.apache.poi.ss.SpreadsheetVersion, org.apache.poi.ss.formula.EvaluationCell, .EvaluationName, .EvaluationSheet, .EvaluationWorkbook, .FormulaParsingWorkbook, .FormulaRenderingWorkbook, .SheetIdentifier, .SheetRangeIdentifier, org.apache.poi.ss.formula.ptg.Area3DPtg, .NamePtg, .NameXPtg, .Ptg, .Ref3DPtg, org.apache.poi.ss.formula.udf.UDFFinder, org.apache.poi.ss.usermodel.Table, org.apache.poi.ss.util.AreaReference, .CellReference, org.apache.poi.util.Internal

Internal POI use only

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final InternalWorkbook
private final HSSFWorkbook

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
public int
convertFromExternSheetIndex(int externSheetIndex)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.convertFromExternSheetIndex.

HSSF Only - convert an external sheet index to an internal sheet index, for an external-style reference to one of this workbook's own sheets

public static HSSFEvaluationWorkbook
public HSSFName
createName()

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.createName.

Return the underlying workbook

public Ptg
get3DReferencePtg(CellReference cr, SheetIdentifier sheet)

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.get3DReferencePtg.

Produce the appropriate Ptg for a 3d cell reference

public Ptg
get3DReferencePtg(AreaReference areaRef, SheetIdentifier sheet)

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.get3DReferencePtg.

Produce the appropriate Ptg for a 3d area reference

public EvaluationWorkbook.ExternalName
getExternalName(int externSheetIndex, int externNameIndex)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getExternalName.

HSSF Only - fetch the external-style name details

public EvaluationWorkbook.ExternalName
getExternalName(String nameName, String sheetName, int externalWorkbookNumber)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getExternalName.

XSSF Only - fetch the external-style name details

public EvaluationWorkbook.ExternalSheet
getExternalSheet(int externSheetIndex)

Implements org.apache.poi.ss.formula.FormulaRenderingWorkbook.getExternalSheet, org.apache.poi.ss.formula.EvaluationWorkbook.getExternalSheet.

HSSF Only - fetch the external-style sheet details

Return will have no workbook set if it's actually in our own workbook

public EvaluationWorkbook.ExternalSheet
getExternalSheet(String firstSheetName, String lastSheetName, int externalWorkbookNumber)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getExternalSheet.

XSSF Only - fetch the external-style sheet details

Return will have no workbook set if it's actually in our own workbook

public int
getExternalSheetIndex(String sheetName)

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.getExternalSheetIndex.

gets the externSheet index for a sheet from this workbook

public int
getExternalSheetIndex(String
e.g. "Budget.xls"
workbookName
,
String
a name of a sheet in that workbook
sheetName
)

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.getExternalSheetIndex.

gets the externSheet index for a sheet from an external workbook

public Ptg[]
public EvaluationName
getName(String
the name to search
name
,
int
the 0-based index of the sheet this formula belongs to. The sheet index is required to resolve sheet-level names. -1 means workbook-global names
sheetIndex
)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getName, org.apache.poi.ss.formula.FormulaParsingWorkbook.getName.

Lookup a named range by its name.

public EvaluationName
public String
public NameXPtg
getNameXPtg(String name, SheetIdentifier sheet)

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.getNameXPtg.

Return an external name (named range, function, user-defined function) Ptg

public EvaluationSheet
getSheet(int
The 0-based index of the sheet
sheetIndex
)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getSheet.

Get the sheet identified by the given 0-based index.

private int
public String
public int
public int
getSheetIndex(String sheetName)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getSheetIndex.

Finds a sheet index by case insensitive name.

public String
public String
getSheetName(int
The 0-based index of the sheet
sheetIndex
)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getSheetName.

Returns the name of the sheet at the given 0-based index.

public SpreadsheetVersion
getSpreadsheetVersion()

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getSpreadsheetVersion, org.apache.poi.ss.formula.FormulaParsingWorkbook.getSpreadsheetVersion.

Returns an enum holding spreadhseet properties specific to an Excel version ( max column and row numbers, max arguments to a function, etc.)

public Table
getTable(String name)

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.getTable.

XSSF Only - gets a table that exists in the worksheet

public UDFFinder
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_iBookback to summary
private final InternalWorkbook _iBook
_uBookback to summary
private final HSSFWorkbook _uBook

Constructor Detail

HSSFEvaluationWorkbookback to summary
private HSSFEvaluationWorkbook(HSSFWorkbook book)

Method Detail

clearAllCachedResultValuesback to summary
public void clearAllCachedResultValues()

Implements org.apache.poi.ss.formula.EvaluationWorkbook.clearAllCachedResultValues.

Doc from org.apache.poi.ss.formula.EvaluationWorkbook.clearAllCachedResultValues.

Propagated from WorkbookEvaluator#clearAllCachedResultValues() to clear locally cached data. Implementations must call the same method on all referenced EvaluationSheet instances, as well as clearing local caches.

Annotations
@Override
convertFromExternSheetIndexback to summary
public int convertFromExternSheetIndex(int externSheetIndex)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.convertFromExternSheetIndex.

Doc from org.apache.poi.ss.formula.EvaluationWorkbook.convertFromExternSheetIndex.

HSSF Only - convert an external sheet index to an internal sheet index, for an external-style reference to one of this workbook's own sheets

Annotations
@Override
createback to summary
public static HSSFEvaluationWorkbook create(HSSFWorkbook book)
createNameback to summary
public HSSFName createName()

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.createName.

Doc from org.apache.poi.ss.formula.FormulaParsingWorkbook.createName.

Return the underlying workbook

Annotations
@Override
get3DReferencePtgback to summary
public Ptg get3DReferencePtg(CellReference cr, SheetIdentifier sheet)

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.get3DReferencePtg.

Doc from org.apache.poi.ss.formula.FormulaParsingWorkbook.get3DReferencePtg.

Produce the appropriate Ptg for a 3d cell reference

Annotations
@Override
get3DReferencePtgback to summary
public Ptg get3DReferencePtg(AreaReference areaRef, SheetIdentifier sheet)

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.get3DReferencePtg.

Doc from org.apache.poi.ss.formula.FormulaParsingWorkbook.get3DReferencePtg.

Produce the appropriate Ptg for a 3d area reference

Annotations
@Override
getExternalNameback to summary
public EvaluationWorkbook.ExternalName getExternalName(int externSheetIndex, int externNameIndex)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getExternalName.

Doc from org.apache.poi.ss.formula.EvaluationWorkbook.getExternalName.

HSSF Only - fetch the external-style name details

Annotations
@Override
getExternalNameback to summary
public EvaluationWorkbook.ExternalName getExternalName(String nameName, String sheetName, int externalWorkbookNumber)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getExternalName.

Doc from org.apache.poi.ss.formula.EvaluationWorkbook.getExternalName.

XSSF Only - fetch the external-style name details

Annotations
@Override
Exceptions
IllegalStateException:
XSSF-style external names are not supported for HSSF
getExternalSheetback to summary
public EvaluationWorkbook.ExternalSheet getExternalSheet(int externSheetIndex)

Implements org.apache.poi.ss.formula.FormulaRenderingWorkbook.getExternalSheet, org.apache.poi.ss.formula.EvaluationWorkbook.getExternalSheet.

Doc from org.apache.poi.ss.formula.EvaluationWorkbook.getExternalSheet.

HSSF Only - fetch the external-style sheet details

Return will have no workbook set if it's actually in our own workbook

Returns:EvaluationWorkbook.ExternalSheet

Doc from org.apache.poi.ss.formula.FormulaRenderingWorkbook.getExternalSheet.

null if externSheetIndex refers to a sheet inside the current workbook

Annotations
@Override
getExternalSheetback to summary
public EvaluationWorkbook.ExternalSheet getExternalSheet(String firstSheetName, String lastSheetName, int externalWorkbookNumber)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getExternalSheet.

Doc from org.apache.poi.ss.formula.EvaluationWorkbook.getExternalSheet.

XSSF Only - fetch the external-style sheet details

Return will have no workbook set if it's actually in our own workbook

Returns:EvaluationWorkbook.ExternalSheet

The found sheet

Annotations
@Override
Exceptions
IllegalStateException:
XSSF-style external references are not supported for HSSF
getExternalSheetIndexback to summary
public int getExternalSheetIndex(String sheetName)

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.getExternalSheetIndex.

Doc from org.apache.poi.ss.formula.FormulaParsingWorkbook.getExternalSheetIndex.

gets the externSheet index for a sheet from this workbook

Annotations
@Override
getExternalSheetIndexback to summary
public int getExternalSheetIndex(String workbookName, String sheetName)

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.getExternalSheetIndex.

Doc from org.apache.poi.ss.formula.FormulaParsingWorkbook.getExternalSheetIndex.

gets the externSheet index for a sheet from an external workbook

Parameters
workbookName:String

e.g. "Budget.xls"

sheetName:String

a name of a sheet in that workbook

Annotations
@Override
getFormulaTokensback to summary
public Ptg[] getFormulaTokens(EvaluationCell evalCell)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getFormulaTokens.

Annotations
@Override
getNameback to summary
public EvaluationName getName(String name, int sheetIndex)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getName, org.apache.poi.ss.formula.FormulaParsingWorkbook.getName.

Lookup a named range by its name.

Parameters
name:String

the name to search

sheetIndex:int

the 0-based index of the sheet this formula belongs to. The sheet index is required to resolve sheet-level names. -1 means workbook-global names

Annotations
@Override
getNameback to summary
public EvaluationName getName(NamePtg namePtg)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getName.

Annotations
@Override
getNameTextback to summary
public String getNameText(NamePtg namePtg)

Implements org.apache.poi.ss.formula.FormulaRenderingWorkbook.getNameText.

Annotations
@Override
getNameXPtgback to summary
public NameXPtg getNameXPtg(String name, SheetIdentifier sheet)

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.getNameXPtg.

Return an external name (named range, function, user-defined function) Ptg

Annotations
@Override
getSheetback to summary
public EvaluationSheet getSheet(int sheetIndex)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getSheet.

Doc from org.apache.poi.ss.formula.EvaluationWorkbook.getSheet.

Get the sheet identified by the given 0-based index.

Parameters
sheetIndex:int

The 0-based index of the sheet

Returns:EvaluationSheet

The sheet

Annotations
@Override
getSheetExtIxback to summary
private int getSheetExtIx(SheetIdentifier sheetIden)
getSheetFirstNameByExternSheetback to summary
public String getSheetFirstNameByExternSheet(int externSheetIndex)

Implements org.apache.poi.ss.formula.FormulaRenderingWorkbook.getSheetFirstNameByExternSheet.

Returns:String

Doc from org.apache.poi.ss.formula.FormulaRenderingWorkbook.getSheetFirstNameByExternSheet.

the name of the (first) sheet referred to by the given external sheet index

Annotations
@Override
getSheetIndexback to summary
public int getSheetIndex(EvaluationSheet evalSheet)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getSheetIndex.

Returns:int

Doc from org.apache.poi.ss.formula.EvaluationWorkbook.getSheetIndex.

-1 if the specified sheet is from a different book

Annotations
@Override
getSheetIndexback to summary
public int getSheetIndex(String sheetName)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getSheetIndex.

Doc from org.apache.poi.ss.formula.EvaluationWorkbook.getSheetIndex.

Finds a sheet index by case insensitive name.

Returns:int

the index of the sheet matching the specified name. -1 if not found

Annotations
@Override
getSheetLastNameByExternSheetback to summary
public String getSheetLastNameByExternSheet(int externSheetIndex)

Implements org.apache.poi.ss.formula.FormulaRenderingWorkbook.getSheetLastNameByExternSheet.

Returns:String

Doc from org.apache.poi.ss.formula.FormulaRenderingWorkbook.getSheetLastNameByExternSheet.

the name of the (last) sheet referred to by the given external sheet index

Annotations
@Override
getSheetNameback to summary
public String getSheetName(int sheetIndex)

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getSheetName.

Doc from org.apache.poi.ss.formula.EvaluationWorkbook.getSheetName.

Returns the name of the sheet at the given 0-based index.

Parameters
sheetIndex:int

The 0-based index of the sheet

Returns:String

The name of the sheet

Annotations
@Override
getSpreadsheetVersionback to summary
public SpreadsheetVersion getSpreadsheetVersion()

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getSpreadsheetVersion, org.apache.poi.ss.formula.FormulaParsingWorkbook.getSpreadsheetVersion.

Doc from org.apache.poi.ss.formula.FormulaParsingWorkbook.getSpreadsheetVersion.

Returns an enum holding spreadhseet properties specific to an Excel version ( max column and row numbers, max arguments to a function, etc.)

Annotations
@Override
getTableback to summary
public Table getTable(String name)

Implements org.apache.poi.ss.formula.FormulaParsingWorkbook.getTable.

Doc from org.apache.poi.ss.formula.FormulaParsingWorkbook.getTable.

XSSF Only - gets a table that exists in the worksheet

Annotations
@Override
Exceptions
IllegalStateException:
data tables are not supported in Excel 97-2003 format
getUDFFinderback to summary
public UDFFinder getUDFFinder()

Implements org.apache.poi.ss.formula.EvaluationWorkbook.getUDFFinder.

Annotations
@Override
resolveNameXTextback to summary
public String resolveNameXText(NameXPtg n)

Implements org.apache.poi.ss.formula.FormulaRenderingWorkbook.resolveNameXText, org.apache.poi.ss.formula.EvaluationWorkbook.resolveNameXText.

Annotations
@Override
org.apache.poi.hssf.usermodel back to summary

private final Class HSSFEvaluationWorkbook.Name

extends Object
implements EvaluationName
Class Inheritance
All Implemented Interfaces
org.apache.poi.ss.formula.EvaluationName

Field Summary

Modifier and TypeField and Description
private final int
private final NameRecord

Constructor Summary

AccessConstructor and Description
public
Name(NameRecord nameRecord, int index)

Method Summary

Modifier and TypeMethod and Description
public NamePtg
public Ptg[]
public String
public boolean
public boolean
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_indexback to summary
private final int _index
_nameRecordback to summary
private final NameRecord _nameRecord

Constructor Detail

Nameback to summary
public Name(NameRecord nameRecord, int index)

Method Detail

createPtgback to summary
public NamePtg createPtg()

Implements org.apache.poi.ss.formula.EvaluationName.createPtg.

Annotations
@Override
getNameDefinitionback to summary
public Ptg[] getNameDefinition()

Implements org.apache.poi.ss.formula.EvaluationName.getNameDefinition.

Annotations
@Override
getNameTextback to summary
public String getNameText()

Implements org.apache.poi.ss.formula.EvaluationName.getNameText.

Annotations
@Override
hasFormulaback to summary
public boolean hasFormula()

Implements org.apache.poi.ss.formula.EvaluationName.hasFormula.

Annotations
@Override
isFunctionNameback to summary
public boolean isFunctionName()

Implements org.apache.poi.ss.formula.EvaluationName.isFunctionName.

Annotations
@Override
isRangeback to summary
public boolean isRange()

Implements org.apache.poi.ss.formula.EvaluationName.isRange.

Annotations
@Override