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
110
unable to load xls
posted

Dear,

I'm trying to load an xls file using 

 workbook1 = Workbook.Load(Path)
but this generates an exception

Message: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Stack Trace:
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Infragistics.Documents.Excel.Serialization.BIFF8.BiffRecords.STYLEEXTRecord.LoadHelper(BIFF8WorkbookSerializationManager manager, STYLEEXTRecordInfo info, Int32 stlyeIndex)
at Infragistics.Documents.Excel.Serialization.BIFF8.BIFF8WorkbookSerializationManager.VerifyFormatsLoaded()
at Infragistics.Documents.Excel.Serialization.BIFF8.BiffRecords.EOFRecord.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, Boolean verifyExcel2007Xml)
at Jdn.ICat.Tasks.ImportExcelFoodOrder.ReadExcel(String p, FoodOrder foodorder) in D:\DOTNET\Local\Logistics.iCat\DEV\iCat\Jdn.ICat.Tasks\ImportExcelFoodOrder.vb:line 81

I found a work around for my user:

Open the file in excel 2010 and do a save. The file extension is still .xls so i don't understand what good this does.

Is there another work around or fix ?

PS :Infragistics4.Win.v12.1

      version :12.1.20121.2054

Parents
  • 53790
    Verified Answer
    posted

    Hello Dimitri,

    Thanks for attached stack trace. In that version we implement many fixes, so my first suggestion is to upgrade your current version with the latest available service release  12.1.20121.2135. If you have the same issue after this upgrade, I`ll ask you to upload your excel file that reproduce the issue. By this way, we will be able to debug the source code to find the reasons for the issue.

    If you have any questions, feel free to write me

Reply Children
No Data