SheetRangeEvaluator createExternSheetRefEvaluator(ExternSheetReferenceToken ptg) {
return createExternSheetRefEvaluator(ptg.getExternSheetIndex());
}
- SheetRangeEvaluator createExternSheetRefEvaluator(String sheetName, int externalWorkbookNumber) {
- ExternalSheet externalSheet = _workbook.getExternalSheet(sheetName, null, externalWorkbookNumber);
+ SheetRangeEvaluator createExternSheetRefEvaluator(String firstSheetName, String lastSheetName, int externalWorkbookNumber) {
+ ExternalSheet externalSheet = _workbook.getExternalSheet(firstSheetName, lastSheetName, externalWorkbookNumber);
return createExternSheetRefEvaluator(externalSheet);
}
SheetRangeEvaluator createExternSheetRefEvaluator(int externSheetIndex) {
return new LazyRefEval(rptg.getRow(), rptg.getColumn(), sre);
}
public ValueEval getRef3DEval(Ref3DPxg rptg) {
- SheetRangeEvaluator sre = createExternSheetRefEvaluator(rptg.getSheetName(), rptg.getExternalWorkbookNumber());
+ SheetRangeEvaluator sre = createExternSheetRefEvaluator(
+ rptg.getSheetName(), rptg.getLastSheetName(), rptg.getExternalWorkbookNumber());
return new LazyRefEval(rptg.getRow(), rptg.getColumn(), sre);
}
aptg.getLastRow(), aptg.getLastColumn(), sre);
}
public ValueEval getArea3DEval(Area3DPxg aptg) {
- SheetRangeEvaluator sre = createExternSheetRefEvaluator(aptg.getSheetName(), aptg.getExternalWorkbookNumber());
+ SheetRangeEvaluator sre = createExternSheetRefEvaluator(
+ aptg.getSheetName(), aptg.getLastSheetName(), aptg.getExternalWorkbookNumber());
return new LazyAreaEval(aptg.getFirstRow(), aptg.getFirstColumn(),
aptg.getLastRow(), aptg.getLastColumn(), sre);
}
* Sheets 1 through Sheet 3).
* This test, based on common test files for HSSF and XSSF, checks
* that we can correctly evaluate these
- *
- * TODO Fix this to pass for XSSF too, currently only passes for HSSF...
*/
- public void DISABLEDtestMultiSheetReferencesHSSFandXSSF() throws Exception {
+ public void testMultiSheetReferencesHSSFandXSSF() throws Exception {
Workbook[] wbs = new Workbook[] {
HSSFTestDataSamples.openSampleWorkbook("55906-MultiSheetRefs.xls"),
XSSFTestDataSamples.openSampleWorkbook("55906-MultiSheetRefs.xlsx")