Ejemplo n.º 1
0
        private ValueEval GetLocalNameXEval(NameXPxg nameXPxg)
        {
            // Look up the sheet, if present
            int sIdx = -1;
            if (nameXPxg.SheetName != null)
            {
                sIdx = _workbook.GetSheetIndex(nameXPxg.SheetName);
            }

            // Is it a name or a function?
            String name = nameXPxg.NameName;
            IEvaluationName evalName = _workbook.GetName(name, sIdx);
            if (evalName != null)
            {
                // Process it as a name
                return new ExternalNameEval(evalName);
            }
            else
            {
                // Must be an external function
                return new FunctionNameEval(name);
            }
        }
Ejemplo n.º 2
0
        public ValueEval GetNameXEval(NameXPxg nameXPxg)
        {
            ExternalSheet externSheet = _workbook.GetExternalSheet(nameXPxg.SheetName, null, nameXPxg.ExternalWorkbookNumber);
            if (externSheet == null || externSheet.WorkbookName == null)
            {
                // External reference to our own workbook's name
                return GetLocalNameXEval(nameXPxg);
            }

            // Look it up for the external workbook
            String workbookName = externSheet.WorkbookName;
            ExternalName externName = _workbook.GetExternalName(
                  nameXPxg.NameName,
                  nameXPxg.SheetName,
                  nameXPxg.ExternalWorkbookNumber
            );
            return GetExternalNameXEval(externName, workbookName);
        }