public final class EvalBook extends Object implements EvaluationWorkbook, FormulaParsingWorkbook, Serializable
EvaluationWorkbook.ExternalName, EvaluationWorkbook.ExternalSheet
Modifier and Type | Method and Description |
---|---|
int |
convertFromExternSheetIndex(int externSheetIndex) |
int |
convertLastIndexFromExternSheetIndex(int externSheetIndex) |
TablePtg |
createTablePtg(String tableName,
Object[] specifiers,
int sheetIndex,
int rowIdx,
int colIdx) |
String |
getBookNameFromExternalLinkIndex(String externalLinkIndex)
Return the associated book name of the specified ExternalLink index.
|
EvaluationWorkbook.ExternalName |
getExternalName(int externSheetIndex,
int externNameIndex) |
EvaluationWorkbook.ExternalSheet |
getExternalSheet(int externSheetIndex) |
int |
getExternalSheetIndex(String sheetName)
gets the externSheet index for a sheet from this workbook
|
int |
getExternalSheetIndex(String workbookName,
String sheetName)
gets the externSheet index for a sheet from an external workbook
|
Map<String,Formula> |
getFormulaParsingCache() |
Ptg[] |
getFormulaTokens(EvaluationCell cell) |
Ptg[] |
getFormulaTokens(int sheetIndex,
String formula) |
EvaluationName |
getName(NamePtg namePtg) |
EvaluationName |
getName(NamePtg namePtg,
int contextSheetIndex) |
EvaluationName |
getName(String name,
int sheetIndex)
named range name matching is case insensitive
|
EvaluationName |
getName(String name,
String sheetName)
named range name matching is case insensitive
|
NameXPtg |
getNameXPtg(String name) |
SBook |
getNBook() |
EvaluationName |
getOrCreateName(String name,
int sheetIndex)
named range name matching is case insensitive
|
EvaluationSheet |
getSheet(int sheetIndex) |
int |
getSheetIndex(EvaluationSheet evalSheet) |
int |
getSheetIndex(String sheetName)
Finds a sheet index by case insensitive name.
|
String |
getSheetName(int sheetIndex) |
SpreadsheetVersion |
getSpreadsheetVersion()
Returns an enum holding spreadhseet properties specific to an Excel version (
max column and row numbers, max arguments to a function, etc.)
|
String |
getTableName(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.
|
String |
resolveNameXText(NameXPtg n) |
public EvalBook(SBook book)
public SBook getNBook()
public Ptg[] getFormulaTokens(EvaluationCell cell)
getFormulaTokens
in interface EvaluationWorkbook
public Ptg[] getFormulaTokens(int sheetIndex, String formula)
getFormulaTokens
in interface EvaluationWorkbook
public EvaluationName getName(String name, int sheetIndex)
FormulaParsingWorkbook
getName
in interface EvaluationWorkbook
getName
in interface FormulaParsingWorkbook
public EvaluationName getName(NamePtg namePtg)
getName
in interface EvaluationWorkbook
public EvaluationName getName(NamePtg namePtg, int contextSheetIndex)
getName
in interface EvaluationWorkbook
public EvaluationWorkbook.ExternalName getExternalName(int externSheetIndex, int externNameIndex)
getExternalName
in interface EvaluationWorkbook
public UDFFinder getUDFFinder()
getUDFFinder
in interface EvaluationWorkbook
public EvaluationSheet getSheet(int sheetIndex)
getSheet
in interface EvaluationWorkbook
public int getSheetIndex(EvaluationSheet evalSheet)
getSheetIndex
in interface EvaluationWorkbook
public int getSheetIndex(String sheetName)
EvaluationWorkbook
getSheetIndex
in interface EvaluationWorkbook
public String getSheetName(int sheetIndex)
getSheetName
in interface EvaluationWorkbook
public EvaluationWorkbook.ExternalSheet getExternalSheet(int externSheetIndex)
getExternalSheet
in interface EvaluationWorkbook
null
if externSheetIndex refers to a sheet inside the current workbookpublic String resolveNameXText(NameXPtg n)
resolveNameXText
in interface EvaluationWorkbook
public int convertFromExternSheetIndex(int externSheetIndex)
convertFromExternSheetIndex
in interface EvaluationWorkbook
public int convertLastIndexFromExternSheetIndex(int externSheetIndex)
convertLastIndexFromExternSheetIndex
in interface EvaluationWorkbook
public NameXPtg getNameXPtg(String name)
getNameXPtg
in interface FormulaParsingWorkbook
public int getExternalSheetIndex(String sheetName)
FormulaParsingWorkbook
getExternalSheetIndex
in interface FormulaParsingWorkbook
public int getExternalSheetIndex(String workbookName, String sheetName)
FormulaParsingWorkbook
getExternalSheetIndex
in interface FormulaParsingWorkbook
workbookName
- e.g. "Budget.xls"sheetName
- a name of a sheet in that workbookpublic SpreadsheetVersion getSpreadsheetVersion()
FormulaParsingWorkbook
getSpreadsheetVersion
in interface FormulaParsingWorkbook
public String getBookNameFromExternalLinkIndex(String externalLinkIndex)
FormulaParsingWorkbook
getBookNameFromExternalLinkIndex
in interface FormulaParsingWorkbook
externalLinkIndex
- external link indexpublic EvaluationName getOrCreateName(String name, int sheetIndex)
FormulaParsingWorkbook
getOrCreateName
in interface FormulaParsingWorkbook
public boolean isAllowedDeferredNamePtg()
FormulaParsingWorkbook
isAllowedDeferredNamePtg
in interface FormulaParsingWorkbook
public EvaluationName getName(String name, String sheetName)
FormulaParsingWorkbook
getName
in interface FormulaParsingWorkbook
public TablePtg createTablePtg(String tableName, Object[] specifiers, int sheetIndex, int rowIdx, int colIdx)
createTablePtg
in interface FormulaParsingWorkbook
public String getTableName(String name)
FormulaParsingWorkbook
getTableName
in interface FormulaParsingWorkbook
public Map<String,Formula> getFormulaParsingCache()
getFormulaParsingCache
in interface FormulaParsingWorkbook
Copyright © 2020. All rights reserved.