Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
Error when loading workbook with named references
posted

I have an excel workbook with several named references defined.  The workbook opens fine in Excel.  However an exception is thrown when I try to load it using Infragistics.Excel.Workbook.Load (see details below).  Attached is a sample project.

message: {"The name to find cannot be null or empty.\r\nParameter name: name"}

stack trace:


   at Infragistics.Excel.NamedReferenceCollection.Find(String name, Object scope)
   at Infragistics.Excel.FormulaUtilities.Tokens.NameToken.GetCalcValue(Workbook workbook, IWorksheetCell formulaOwner)
   at Infragistics.Excel.FormulaUtilities.CalcEngine.CalcEngineTokenConverter.ConvertOperandToken(OperandToken operandToken, ExcelCalcFormula formula, Workbook workbook)
   at Infragistics.Excel.FormulaUtilities.CalcEngine.CalcEngineTokenConverter.ConvertToken(FormulaToken token, ExcelCalcFormula formula, Workbook workbook)
   at Infragistics.Excel.FormulaUtilities.CalcEngine.CalcEngineTokenConverter.ConvertTokens(ExcelCalcFormula formula, Workbook workbook)
   at Infragistics.Excel.Workbook.CompileFormula(IExcelCalcReference baseReference, Formula excelFormula)
   at Infragistics.Excel.FormulaUtilities.CalcEngine.ExcelRefBase.SetAndCompileFormula(Formula newExcelFormula, Boolean canClearPreviouslyCalculatedValue)
   at Infragistics.Excel.Workbook.ResumeCalculations(Boolean doFirstEvaluationIfInManualMode)
   at Infragistics.Excel.Workbook.LoadHelper(Stream stream, WorkbookFormat format, String parameterName, IPackageFactory packageFactory, Boolean verifyExcel2007Xml)
   at Infragistics.Excel.Workbook.Load(String fileName, IPackageFactory packageFactory, Boolean verifyExcel2007Xml)
   at Infragistics.Excel.Workbook.Load(String fileName)
   at WindowsFormsApplication1.Form1.ultraButton1_Click(Object sender, EventArgs e) in C:\Documents and Settings\araman99\Desktop\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs:line 24
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at Infragistics.Win.UltraControlBase.OnClick(EventArgs e)
   at Infragistics.Win.Misc.UltraButtonBase.OnClick(EventArgs e)
   at Infragistics.Win.Misc.UltraButton.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at WindowsFormsApplication1.Program.Main() in C:\Documents and Settings\araman99\Desktop\WindowsFormsApplication1\WindowsFormsApplication1\Program.cs:line 18
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

WindowsFormsApplication1.zip
Parents
No Data
Reply
  • 44743
    posted

    This issue has already been reported as bug id 99944 and fixed. However, it was fixed in versions 11.1 and later I see your sample is using version 10.2, which is no longer supported. You will need to upgrade to a later version to resolve this issue.

Children
No Data