return _columnIndex;
}
/* package */ SheetRefEvaluator createExternSheetRefEvaluator(ExternSheetReferenceToken ptg) {
int externSheetIndex = ptg.getExternSheetIndex();
ExternalSheet externalSheet = _workbook.getExternalSheet(externSheetIndex);
WorkbookEvaluator targetEvaluator;
int otherSheetIndex;
if (externalSheet == null) {
// sheet is in same workbook
otherSheetIndex = _workbook.convertFromExternSheetIndex(externSheetIndex);
targetEvaluator = _bookEvaluator;
} else {
// look up sheet by name from external workbook
String workbookName = externalSheet.getWorkbookName();
try {
targetEvaluator = _bookEvaluator.getOtherWorkbookEvaluator(workbookName);
} catch (WorkbookNotFoundException e) {
throw new RuntimeException(e.getMessage());
}
otherSheetIndex = targetEvaluator.getSheetIndex(externalSheet.getSheetName());
if (otherSheetIndex < 0) {
throw new RuntimeException("Invalid sheet name '" + externalSheet.getSheetName()
+ "' in bool '" + workbookName + "'.");
}
}
return new SheetRefEvaluator(targetEvaluator, _tracker, otherSheetIndex);
}