We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Exception message: Specified argument was out of the range of valid values.

Hello, I am using XlsIO in a  VB.NET environment.  We take in .xls, xlsm,xlsx files via a stream and for the most part are able to open them with XlsIO without issue. However at times some excel files cannot be opened by XlsIO, but I can open them locally without issue using Microsft Excel.  I am unable to share a sample because I would need to resave the file to remove sensitive data. When I resave the file locally in excel XlsIO is able to open the file.  Do you have any suggestions on how to work around this issue?

RunTime version: v4.0.30319
Version: 15.2450.0.40

Stack Trace below:

Exception information:
    Exception type: System.ArgumentOutOfRangeException
    Exception message: Specified argument was out of the range of valid values.
Parameter name: iColumn2


Thread information:

    Stack trace:    at Syncfusion.XlsIO.Implementation.Shapes.ShapeImpl.GetWidth(Int32 iColumn1, Int32 iOffset1, Int32 iColumn2, Int32 iOffset2, Boolean bIsOffsetInPixels)
   at Syncfusion.XlsIO.Implementation.Shapes.ShapeImpl.UpdateWidth()
   at Syncfusion.XlsIO.Implementation.Shapes.ShapeImpl.ParseClientAnchor(MsofbtClientAnchor clientAnchor)
   at Syncfusion.XlsIO.Implementation.Shapes.ShapeImpl.ParseRecord(ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.ShapeCollectionBase.AddShape(MsofbtSpContainer shapeContainer, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.ShapeCollectionBase.AddShape(MsoBase shape, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.ShapeCollectionBase.Parse(MsofbtSpgrContainer container, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.ShapeCollectionBase.ParseMsoDgContainer(MsofbtDgContainer dgContainer, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.ShapeCollectionBase.ParseMsoStructures(List`1 arrStructures, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.WorksheetBaseImpl.ExtractMSODrawing(Int32 startIndex, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.WorksheetBaseImpl.Parse()
   at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseWorksheets()
   at Syncfusion.XlsIO.Implementation.WorkbookImpl.Parse(BiffReader reader, ExcelParseOptions options, String password)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseStgStream(ICompoundStorage storage, ExcelParseOptions options, String password)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseStream(Stream stream, String password, ExcelVersion version, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, Stream stream, ExcelParseOptions options, ExcelVersion version)
   at Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateWorkbook(Object parent, Stream stream, ExcelVersion version, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelVersion version, ExcelParseOptions options)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelOpenType openType)
   at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream) 

3 Replies

SR Sudha Ramachandran Syncfusion Team June 5, 2017 07:13 AM UTC

Hi Patrick, 

As the issue is specific to the document you use, we need that document to analyze further. You can share the document by creating an incident in DirectTrac. The documents shared will not be disclosed and is only for the purpose to reproduce the issue. We assure you that the document will be deleted from our side once the issue is resolved. 

Regards, 
Sudha R 



TH TheDarkBoz November 20, 2017 11:44 PM UTC

If somebody have the same issue  iColumn1  or  iColumn2 it is probably that you use 0 like value. I had the same issue.


AV Abirami Varadharajan Syncfusion Team November 21, 2017 12:42 PM UTC

Hi TheDarkBoz,  

Thank you for your suggestion. 
   
We are able to reproduce the issue. A support incident to track the status of this issue has been created under your account. Please log on to our support website to check for further updates.     
      
     
Please let us know if you have any concerns.    
    
Regards,    
Abirami.    


Loader.
Live Chat Icon For mobile
Up arrow icon