public class ParsingBook extends java.lang.Object implements FormulaParsingWorkbook, FormulaRenderingWorkbook
Constructor and Description |
---|
ParsingBook(SBook book) |
Modifier and Type | Method and Description |
---|---|
TablePtg |
createTablePtg(java.lang.String tableName,
java.lang.Object[] specifiers,
int sheetIndex,
int rowIdx,
int colIdx) |
int |
findExternalSheetIndex(java.lang.String sheetName) |
int |
findExternalSheetIndex(java.lang.String workbookName,
java.lang.String sheetName) |
EvaluationWorkbook.ExternalSheet |
getAnyExternalSheet(int externSheetIndex) |
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.ExternalSheet |
getExternalSheet(int externSheetIndex) |
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
|
java.lang.String |
getFullNameText(NamePtg namePtg)
Return the full qualified expression.
|
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.Object[] |
getNameInfo(NamePtg namePtg) |
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
|
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.
|
boolean |
isAllowedDeferredNamePtg()
In HSSF, we need to render a formula string from stored Ptg, so a formula cannot be parsed to DeferredNamePtg.
|
void |
renameName(int sheetIndex,
java.lang.String oldName,
java.lang.String newName) |
void |
renameSheet(java.lang.String bookName,
java.lang.String oldName,
java.lang.String newName)
rename a sheet in this parsing book directly.
|
void |
reorderSheet(java.lang.String bookName,
int oldIndex,
int newIndex)
reorder a sheet in this parsing book directly.
|
java.lang.Object[] |
resolveNameXInfo(NameXPtg nameXPtg) |
java.lang.String |
resolveNameXText(NameXPtg nameXPtg) |
public ParsingBook(SBook book)
public void renameName(int sheetIndex, java.lang.String oldName, java.lang.String newName)
public EvaluationName getName(java.lang.String name, int sheetIndex)
FormulaParsingWorkbook
getName
in interface FormulaParsingWorkbook
public NameXPtg getNameXPtg(java.lang.String name)
getNameXPtg
in interface FormulaParsingWorkbook
public int getExternalSheetIndex(java.lang.String sheetName)
FormulaParsingWorkbook
getExternalSheetIndex
in interface FormulaParsingWorkbook
public 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 findExternalSheetIndex(java.lang.String sheetName)
sheetName
- sheet name or 3D sheet name (e.g "Sheet1:Sheet3")public int findExternalSheetIndex(java.lang.String workbookName, java.lang.String sheetName)
workbookName
- book name or nullsheetName
- sheet name or 3D sheet name (e.g "Sheet1:Sheet3")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 java.lang.String getNameText(NamePtg namePtg)
getNameText
in interface FormulaRenderingWorkbook
public java.lang.String getFullNameText(NamePtg namePtg)
FormulaRenderingWorkbook
getFullNameText
in interface FormulaRenderingWorkbook
public java.lang.Object[] getNameInfo(NamePtg namePtg)
public java.lang.String resolveNameXText(NameXPtg nameXPtg)
resolveNameXText
in interface FormulaRenderingWorkbook
public java.lang.Object[] resolveNameXInfo(NameXPtg nameXPtg)
public EvaluationWorkbook.ExternalSheet getAnyExternalSheet(int externSheetIndex)
public EvaluationWorkbook.ExternalSheet getExternalSheet(int externSheetIndex)
getExternalSheet
in interface FormulaRenderingWorkbook
null
if externSheetIndex refers to a sheet inside the current workbookpublic java.lang.String getSheetNameByExternSheet(int externSheetIndex)
getSheetNameByExternSheet
in interface FormulaRenderingWorkbook
public java.lang.String getExternalLinkIndexFromBookName(java.lang.String bookname)
getExternalLinkIndexFromBookName
in interface FormulaRenderingWorkbook
public void renameSheet(java.lang.String bookName, java.lang.String oldName, java.lang.String newName)
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 void reorderSheet(java.lang.String bookName, int oldIndex, int newIndex)
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.