Example #1
0
 SheetRefEvaluator CreateExternSheetRefEvaluator(ExternSheetReferenceToken ptg)
 {
     return(CreateExternSheetRefEvaluator(ptg.ExternSheetIndex));
 }
 SheetRefEvaluator CreateExternSheetRefEvaluator(ExternSheetReferenceToken ptg)
 {
     return CreateExternSheetRefEvaluator(ptg.ExternSheetIndex);
 }
        private SheetRefEvaluator CreateExternSheetRefEvaluator(EvaluationTracker tracker,
                ExternSheetReferenceToken ptg)
        {
            int externSheetIndex = ptg.ExternSheetIndex;
            ExternalSheet externalSheet = _workbook.GetExternalSheet(externSheetIndex);
            if (externalSheet != null)
            {
                WorkbookEvaluator otherEvaluator = _collaboratingWorkbookEnvironment.GetWorkbookEvaluator(externalSheet.GetWorkbookName());
                EvaluationWorkbook otherBook = otherEvaluator._workbook;
                int otherSheetIndex = otherBook.GetSheetIndex(externalSheet.GetSheetName());
                return new SheetRefEvaluator(otherEvaluator, tracker, otherBook, otherSheetIndex);
            }
            int otherSheetIndex1 = _workbook.ConvertFromExternSheetIndex(externSheetIndex);
            return new SheetRefEvaluator(this, tracker, _workbook, otherSheetIndex1);

        }