Skip to content

Infragistics Community Forum / Desktop / Ultimate UI for Windows Forms / System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

New Discussion
Jason Wang
Jason Wang asked on Aug 25, 2020 1:26 PM

Hi,

I have one application using UltraGridExcelExporter in Infragistics2.Excel.v10.3 to export excel file. It gives below error.

The application works fine util I upgrade Office  2013 to Office 365.

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

 

************** Exception Text **************

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

at System.ThrowHelper.ThrowKeyNotFoundException()

at System.Collections.Generic.Dictionary`2.get_Item(TKey key)

at Infragistics.Excel.Serialization.BIFF8.BIFF8WorkbookSerializationManager.WriteWorksheetRowBlocks(Worksheet worksheet, List`1& dbcellRecordPositions)

at Infragistics.Excel.Serialization.BIFF8.BIFF8WorkbookSerializationManager.WriteWorksheet(Worksheet worksheet, Boolean hasShapes)

at Infragistics.Excel.Serialization.WorkbookSerializationManager.WriteWorksheetRecords(Worksheet worksheet, Boolean hasShapes)

at Infragistics.Excel.Serialization.BIFF8.BIFF8WorkbookSerializationManager.SaveWorkbookContents(Boolean workbookHasShapes)

at Infragistics.Excel.Serialization.WorkbookSerializationManager.Save()

at Infragistics.Excel.Workbook.SaveBIFF8File(Stream stream)

at Infragistics.Excel.Workbook.Save(String fileName, IPackageFactory packageFactory)

at Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter.Export(UltraGrid grid, String fileName)

at RexallHPGClient.InvoiceForm.ExportToExcel(ExportType type)

at RexallHPGClient.InvoiceForm.ultraToolbarsManager1_ToolClick(Object sender, ToolClickEventArgs e)

at Infragistics.Win.UltraWinToolbars.ToolClickEventHandler.Invoke(Object sender, ToolClickEventArgs e)

at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnToolClick(ToolClickEventArgs e)

at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.FireEvent(ToolbarEventIds id, EventArgs e)

at Infragistics.Win.UltraWinToolbars.PopupMenuItemUIElement.DoClickProcessing(MouseEventArgs e)

at Infragistics.Win.UltraWinToolbars.PopupMenuItemUIElement.OnMouseUp(MouseEventArgs e)

at Infragistics.Win.TextUIElementBase.OnMouseUp(MouseEventArgs e)

at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e)

at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e)

at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)

at Infragistics.Win.UltraWinToolbars.PopupControlBase.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.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Sign In to post a reply

Replies

  • 0
    Jason Wang
    Jason Wang answered on Aug 25, 2020 1:12 PM

    Any advice or idea of the possible cause would be greatly appreciated!!

    • 0
      Teodosia Hristodorova
      Teodosia Hristodorova answered on Aug 25, 2020 1:26 PM

      Hello,


      This exception is thrown when you try to index to something that isn't there. I was able to find out several issues similar to this that we've already fixed for versions 12.2 and later.  The stack trace is similar but not an exact match. In would be helpful if you could provide more details about your scenario and share a sample that demonstrates the exception I could examine the matter in detail.


      Please keep in mind that according to our support policy Infragistics products have one year of product service releases and three years of developer support. This means that version 10 is considered retired and it is no longer eligible for Developer Support Services.  More about the Infragistics product lifecycle can be found here.


      Thank you for your cooperation.


      Looking forward to hearing from you.


      Sincerely,
      Teodosia Hristodorova
      Associate Software Developer

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Jason Wang
Favorites
0
Replies
2
Created On
Aug 25, 2020
Last Post
5 years, 11 months ago

Suggested Discussions

Tags

No tags

Created by

Created on

Aug 25, 2020 1:26 PM

Last activity on

Feb 23, 2026 8:52 AM