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
415
Infragistics.Excel.Workbook.Load(Template) Generating Error on 64-Bit OS/Office
posted

Attempting to export grid data on Win7 64-Bit with Office 2010 64-bit generates the following error:

Index was out of range. It must be non-negative and less than the size of the collection.
Parameter name: index
Actual value was 0., Exporting to file = 'C:\Users\Administrator\AppData\Local\Temp\Customers_5AB5.tmp'; Using template = 'C:\Program Files (x86)\Sage Software\Sage MAS 500 Client\GridTemplates\empty.xlsx'; Excel file format = 'Unknown'.
   at Infragistics.Excel.WorksheetCollection.get_Item(Int32 index)
   at Infragistics.Excel.Workbook.OnAfterLoadGlobalSettings(WorkbookSerializationManager manager)
   at Infragistics.Excel.Serialization.Excel2007.XLSX.Elements.WorkbookElement.OnAfterLoadChildElements(Excel2007WorkbookSerializationManager manager, ElementDataCache elementCache)
   at Infragistics.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, ExcelXmlDocument document, XmlReader reader, ElementDataCache elementCache, List`1 elementCacheCollection, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode)
   at Infragistics.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode)
   at Infragistics.Excel.Serialization.Excel2007.XmlContentTypeBase.Load(Excel2007WorkbookSerializationManager manager, Stream contentTypeStream)
   at Infragistics.Excel.Serialization.Excel2007.Excel2007WorkbookSerializationManager.LoadPart(IPackagePart part)
   at Infragistics.Excel.Serialization.Excel2007.Excel2007WorkbookSerializationManager.LoadPartRelationships(IEnumerable`1 relationships, ContentTypeBase contentType)
   at Infragistics.Excel.Serialization.Excel2007.Excel2007WorkbookSerializationManager.LoadWorkbookContents()
   at Infragistics.Excel.Serialization.WorkbookSerializationManager.Load()
   at Infragistics.Excel.Workbook.LoadXLSXFile(Workbook workbook, Stream stream, IPackageFactory packageFactory, Boolean verifyExcel2007Xml)
   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)

The excel file is 2010 file format, a workbook with three blank sheets.

Parents
No Data
Reply
  • 12773
    posted

    Hello,

    I am not sure about your scenario, you mentioned that you are exporting the grid data, but you also mentioned when you load template. Also Is far I can see you are using xlsx file . Can you please give me more clarification about your scenario, what exactly you are doing in the code, and also the excel file that you are trying to load or create, is that existing file and what format. Also can you please let me know which exact version are you suing?

    Sincerely,
    Dimi
    Developer Support Engineer
    Infragistics, Inc.

Children