public final class XSSFEvaluationWorkbook extends java.lang.Object implements FormulaRenderingWorkbook, EvaluationWorkbook, FormulaParsingWorkbook
EvaluationWorkbook.ExternalName, EvaluationWorkbook.ExternalSheet
Modifier and Type | Method and Description |
---|---|
int |
convertFromExternSheetIndex(int externSheetIndex) |
int |
convertLastIndexFromExternSheetIndex(int externSheetIndex) |
static XSSFEvaluationWorkbook |
create(XSSFWorkbook book) |
TablePtg |
createTablePtg(java.lang.String tableName,
java.lang.Object[] specifiers,
int sheetIndex,
int rowIdx,
int colIdx) |
java.lang.String |
getBookNameFromExternalLinkIndex(java.lang.String externalLinkIndex)
Return the associated book name of the specified ExternalLink index.
|
java.lang.String |
getExternalLinkIndexFromBookName(java.lang.String bookname) |
EvaluationWorkbook.ExternalName |
getExternalName(int externSheetIndex,
int externNameIndex) |
EvaluationWorkbook.ExternalSheet |
getExternalSheet(int externSheetIndex)
Return null if in the same workbook
|
int |
getExternalSheetIndex(java.lang.String sheetName)
gets the externSheet index for a sheet from this workbook
|
int |
getExternalSheetIndex(java.lang.String workbookName,
java.lang.String sheetName)
gets the externSheet index for a sheet from an external workbook
|
Ptg[] |
getFormulaTokens(EvaluationCell evalCell) |
Ptg[] |
getFormulaTokens(int sheetIndex,
java.lang.String formula) |
java.lang.String |
getFullNameText(NamePtg namePtg)
Return the full qualified expression.
|
EvaluationName |
getName(NamePtg namePtg) |
EvaluationName |
getName(NamePtg namePtg,
int contextSheetIndex) |
EvaluationName |
getName(java.lang.String name,
int sheetIndex)
named range name matching is case insensitive
|
EvaluationName |
getName(java.lang.String name,
java.lang.String sheetName)
named range name matching is case insensitive
|
java.lang.String |
getNameText(NamePtg namePtg) |
NameXPtg |
getNameXPtg(java.lang.String name) |
EvaluationName |
getOrCreateName(java.lang.String name,
int sheetIndex)
named range name matching is case insensitive
|
EvaluationSheet |
getSheet(int sheetIndex) |
int |
getSheetIndex(EvaluationSheet evalSheet) |
int |
getSheetIndex(java.lang.String sheetName)
Finds a sheet index by case insensitive name.
|
java.lang.String |
getSheetName(int sheetIndex) |
java.lang.String |
getSheetNameByExternSheet(int externSheetIndex) |
SpreadsheetVersion |
getSpreadsheetVersion()
Returns an enum holding spreadhseet properties specific to an Excel version (
max column and row numbers, max arguments to a function, etc.)
|
java.lang.String |
getTableName(java.lang.String name)
Given a name and return the real table name(consider uppercase/lowecase);
It can be used to check whether the specified name is a table name if
the returned name is null.
|
UDFFinder |
getUDFFinder() |
boolean |
isAllowedDeferredNamePtg()
In HSSF, we need to render a formula string from stored Ptg, so a formula cannot be parsed to DeferredNamePtg.
|
java.lang.String |
resolveNameXText(NameXPtg n) |
public static XSSFEvaluationWorkbook create(XSSFWorkbook book)
public int convertFromExternSheetIndex(int externSheetIndex)
convertFromExternSheetIndex
in interface EvaluationWorkbook
public int convertLastIndexFromExternSheetIndex(int externSheetIndex)
convertLastIndexFromExternSheetIndex
in interface EvaluationWorkbook
public int getExternalSheetIndex(java.lang.String sheetName)
FormulaParsingWorkbook
getExternalSheetIndex
in interface FormulaParsingWorkbook
public EvaluationName getName(java.lang.String name, int sheetIndex)
FormulaParsingWorkbook
getName
in interface EvaluationWorkbook
getName
in interface FormulaParsingWorkbook
public int getSheetIndex(EvaluationSheet evalSheet)
getSheetIndex
in interface EvaluationWorkbook
public java.lang.String getSheetName(int sheetIndex)
getSheetName
in interface EvaluationWorkbook
public EvaluationWorkbook.ExternalName getExternalName(int externSheetIndex, int externNameIndex)
getExternalName
in interface EvaluationWorkbook
public NameXPtg getNameXPtg(java.lang.String name)
getNameXPtg
in interface FormulaParsingWorkbook
public java.lang.String resolveNameXText(NameXPtg n)
resolveNameXText
in interface EvaluationWorkbook
resolveNameXText
in interface FormulaRenderingWorkbook
public EvaluationSheet getSheet(int sheetIndex)
getSheet
in interface EvaluationWorkbook
public EvaluationWorkbook.ExternalSheet getExternalSheet(int externSheetIndex)
getExternalSheet
in interface EvaluationWorkbook
getExternalSheet
in interface FormulaRenderingWorkbook
null
if externSheetIndex refers to a sheet inside the current workbookpublic int getExternalSheetIndex(java.lang.String workbookName, java.lang.String sheetName)
FormulaParsingWorkbook
getExternalSheetIndex
in interface FormulaParsingWorkbook
workbookName
- e.g. "Budget.xls"sheetName
- a name of a sheet in that workbookpublic int getSheetIndex(java.lang.String sheetName)
EvaluationWorkbook
getSheetIndex
in interface EvaluationWorkbook
public java.lang.String getSheetNameByExternSheet(int externSheetIndex)
getSheetNameByExternSheet
in interface FormulaRenderingWorkbook
public java.lang.String getNameText(NamePtg namePtg)
getNameText
in interface FormulaRenderingWorkbook
public EvaluationName getName(NamePtg namePtg)
getName
in interface EvaluationWorkbook
public EvaluationName getName(NamePtg namePtg, int contextSheetIndex)
getName
in interface EvaluationWorkbook
public Ptg[] getFormulaTokens(EvaluationCell evalCell)
getFormulaTokens
in interface EvaluationWorkbook
public UDFFinder getUDFFinder()
getUDFFinder
in interface EvaluationWorkbook
public SpreadsheetVersion getSpreadsheetVersion()
FormulaParsingWorkbook
getSpreadsheetVersion
in interface FormulaParsingWorkbook
public java.lang.String getBookNameFromExternalLinkIndex(java.lang.String externalLinkIndex)
FormulaParsingWorkbook
getBookNameFromExternalLinkIndex
in interface FormulaParsingWorkbook
externalLinkIndex
- external link indexpublic EvaluationName getOrCreateName(java.lang.String name, int sheetIndex)
FormulaParsingWorkbook
getOrCreateName
in interface FormulaParsingWorkbook
public Ptg[] getFormulaTokens(int sheetIndex, java.lang.String formula)
getFormulaTokens
in interface EvaluationWorkbook
public java.lang.String getExternalLinkIndexFromBookName(java.lang.String bookname)
getExternalLinkIndexFromBookName
in interface FormulaRenderingWorkbook
public boolean isAllowedDeferredNamePtg()
FormulaParsingWorkbook
isAllowedDeferredNamePtg
in interface FormulaParsingWorkbook
public EvaluationName getName(java.lang.String name, java.lang.String sheetName)
FormulaParsingWorkbook
getName
in interface FormulaParsingWorkbook
public java.lang.String getFullNameText(NamePtg namePtg)
FormulaRenderingWorkbook
getFullNameText
in interface FormulaRenderingWorkbook
public TablePtg createTablePtg(java.lang.String tableName, java.lang.Object[] specifiers, int sheetIndex, int rowIdx, int colIdx)
createTablePtg
in interface FormulaParsingWorkbook
public java.lang.String getTableName(java.lang.String name)
FormulaParsingWorkbook
getTableName
in interface FormulaParsingWorkbook
Copyright © 2005-2010 Potix Corporation. All Rights Reserved.