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
20
Cannot load Excel file
posted

Hello there,

I tried to load attached document via Workbook.Load(string fileName) method and has the following error:

An exception of type 'System.ArgumentOutOfRangeException' occurred in Infragistics4.Documents.Excel.v13.1.dll

Specified argument was out of the range of valid values.
Parameter name: The specified index is is not valid in the collection.

   at Infragistics.Documents.Excel.Utilities.VerifyCollectionIndex(Int32 index, Int32 count)
   at Infragistics.Documents.Excel.CustomTableStyleCollection.get_Item(Int32 index)
   at Infragistics.Documents.Excel.Serialization.BIFF8.BiffRecords.TABLESTYLEELEMENTRecord.Load(BIFF8WorkbookSerializationManager manager)
   at Infragistics.Documents.Excel.Serialization.BIFF8.BIFF8WorkbookSerializationManager.LoadCurrentRecord()
   at Infragistics.Documents.Excel.Serialization.BIFF8.BIFF8WorkbookSerializationManager.LoadWorkbookContents()
   at Infragistics.Documents.Excel.Serialization.WorkbookSerializationManager.Load()
   at Infragistics.Documents.Excel.Workbook.LoadBIFF8File(Workbook workbook, Stream stream, IPackageFactory packageFactory, Boolean verifyExcel2007Xml, String parameterName)
   at Infragistics.Documents.Excel.Workbook.LoadHelper(Stream stream, WorkbookFormat format, String parameterName, IPackageFactory packageFactory, Boolean verifyExcel2007Xml)
   at Infragistics.Documents.Excel.Workbook.Load(String fileName, IPackageFactory packageFactory, Boolean verifyExcel2007Xml)
   at Infragistics.Documents.Excel.Workbook.Load(String fileName, IPackageFactory packageFactory)
   at Infragistics.Documents.Excel.Workbook.Load(String fileName)
   at TallEmu.Studio.Excel.PriceListExporter.DoPriceListExport(Int32 priceListId) in d:\Projects\CRM_Studio\Trunk\Projects\WinStudio\Excel\PriceListExporter.cs:line 148
   at TallEmu.Studio.RibbonForm.ProcessCommandExportPriceList(MetaCommand ACommand, MetaDataSource ASource, Dictionary`2 executionContext) in d:\Projects\CRM_Studio\Trunk\Projects\WinStudio\Forms\RibbonForm.cs:line 4570
   at TallEmu.Studio.RibbonForm.ProcessRibbonItemCommand(String AItemKey, MetaCommand ACommand, MetaDataSource AContainerDatasource, RibbonScript AContainerDatasourceScript, ScriptClass AContainerDatasourceScript2, Dictionary`2 executionContext) in d:\Projects\CRM_Studio\Trunk\Projects\WinStudio\Forms\RibbonForm.cs:line 1614
   at TallEmu.Studio.RibbonForm.ProcessRibbonItemCommands(String AItemKey, Dictionary`2 executionContext) in d:\Projects\CRM_Studio\Trunk\Projects\WinStudio\Forms\RibbonForm.cs:line 1236
   at TallEmu.Studio.RibbonForm.ProcessRibbonItemCommands(String AItemKey) in d:\Projects\CRM_Studio\Trunk\Projects\WinStudio\Forms\RibbonForm.cs:line 1083
   at TallEmu.Studio.RibbonForm.ToolbarsManager_ToolClick(Object sender, ToolClickEventArgs e) in d:\Projects\CRM_Studio\Trunk\Projects\WinStudio\Forms\RibbonForm.cs:line 8990
   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.ToolBase.OnToolClick()
   at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.DoClickProcessing(MouseEventArgs e)
   at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.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.UltraControlBase.OnMouseUp(MouseEventArgs e)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

SugaTesting.zip