private ValueEval GetLocalNameXEval(NameXPtg nameXPtg)
        {
            string name = _workbook.ResolveNameXText(nameXPtg);

            // Try to parse it as a name
            int             sheetNameAt = name.IndexOf('!');
            IEvaluationName evalName    = null;

            if (sheetNameAt > -1)
            {
                // Sheet based name
                string sheetName = name.Substring(0, sheetNameAt);
                string nameName  = name.Substring(sheetNameAt + 1);
                evalName = _workbook.GetName(nameName, _workbook.GetSheetIndex(sheetName));
            }
            else
            {
                // Workbook based name
                evalName = _workbook.GetName(name, -1);
            }

            if (evalName != null)
            {
                // Process it as a name
                return(new ExternalNameEval(evalName));
            }
            else
            {
                // Must be an external function
                return(new FunctionNameEval(name));
            }
        }
 public String ResolveNameXText(NameXPtg ptg)
 {
     return(_masterBook.ResolveNameXText(ptg));
 }