Package org.apache.poi.ss.formula
Class SheetRangeEvaluator
- java.lang.Object
-
- org.apache.poi.ss.formula.SheetRangeEvaluator
-
- All Implemented Interfaces:
SheetRange
public final class SheetRangeEvaluator extends Object implements SheetRange
Evaluator for returning cells or sheets for a range of sheets
-
-
Constructor Summary
Constructors Constructor Description SheetRangeEvaluator(int firstSheetIndex, int lastSheetIndex, org.apache.poi.ss.formula.SheetRefEvaluator[] sheetEvaluators)
SheetRangeEvaluator(int onlySheetIndex, org.apache.poi.ss.formula.SheetRefEvaluator sheetEvaluator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
adjustRowNumber(int rowIndex)
This method returns a lower row-number if it would lie outside the row-boundaries of any sheet.String
getBookName()
ValueEval
getEvalForCell(int sheetIndex, int rowIndex, int columnIndex)
int
getFirstSheetIndex()
int
getLastSheetIndex()
int
getSheetCount()
org.apache.poi.ss.formula.SheetRefEvaluator
getSheetEvaluator(int sheetIndex)
String
getSheetName()
String
getSheetName(int sheetIndex)
String
getSheetNameRange()
SortedValues
getSortedColumnValue(int columnIndex)
boolean
isFiltered(int sheetIdx)
boolean
isHidden(int sheetIdx, int rowIndex, int columnIndex)
boolean
isRowHidden(int sheetIdx, int rowIndex)
-
-
-
Method Detail
-
getSheetEvaluator
public org.apache.poi.ss.formula.SheetRefEvaluator getSheetEvaluator(int sheetIndex)
-
getFirstSheetIndex
public int getFirstSheetIndex()
- Specified by:
getFirstSheetIndex
in interfaceSheetRange
-
getLastSheetIndex
public int getLastSheetIndex()
- Specified by:
getLastSheetIndex
in interfaceSheetRange
-
getSheetName
public String getSheetName(int sheetIndex)
-
getSheetNameRange
public String getSheetNameRange()
-
getEvalForCell
public ValueEval getEvalForCell(int sheetIndex, int rowIndex, int columnIndex)
-
adjustRowNumber
public int adjustRowNumber(int rowIndex)
This method returns a lower row-number if it would lie outside the row-boundaries of any sheet. This is used to optimize cases where very high number of rows would be checked otherwise without any benefit as no such row exists anyway.- Parameters:
rowIndex
- The 0-based row-index to check- Returns:
- If the given index lies withing the max row number across all sheets, it is returned. Otherwise, the highest used row number across all sheets is returned.
-
getSheetCount
public int getSheetCount()
-
getSortedColumnValue
public SortedValues getSortedColumnValue(int columnIndex)
-
isHidden
public boolean isHidden(int sheetIdx, int rowIndex, int columnIndex)
-
isRowHidden
public boolean isRowHidden(int sheetIdx, int rowIndex)
-
isFiltered
public boolean isFiltered(int sheetIdx)
-
getBookName
public String getBookName()
-
getSheetName
public String getSheetName()
-
-