Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Wed Jul 09, 2025 12:40 pm

Hello, trying to load an excel file using spire.xls getting the following error.

SpireException: ArgumentOutOfRange_NegativeLength Arg_ParamName_Name, length: at System.String.ThrowSubstringArgumentOutOfRange(Int32, Int32) + 0x98
at sprez3.spra(spre0c, String) + 0x6d0
at sprfdx.sprc(sprfbz, sprfca) + 0x2c1
at sprfdx.sprb(sprfbz, sprfca, sprfb2) + 0x97a
at sprfdx.spra(sprfbz, sprfca, sprfb2, Boolean) + 0x4a
at sprfdx.sprb(sprfbz, sprfca, sprfb2, Boolean) + 0x21
at sprfbm.spra(sprex4, String, Int32, Int32) + 0xe7
at sprex4.spra(String, Int32, Int32) + 0x84
at spres2.spra(XmlTextReader, sprezt, Int32, Int32) + 0x87c
at spres2.sprb(XmlTextReader, Int32) + 0xbd8
at spres2.sprf(XmlTextReader) + 0x101
at spres2.af(XmlTextReader) + 0x63d
at spresy.spra(spreuc, String, Boolean) + 0xc7
at spresy.sprb(spreuc, String, Boolean) + 0x5d
at spresy.sprf() + 0x330
at spresy.ad() + 0xb7
at spresx.spra(sprez8) + 0x82
at sprez8.spra(Stream, sprdf1, Boolean) + 0x940
at sprez8.spra(String, sprdf1) + 0x6b7
at sprez8..ctor(String, sprdf1) + 0x190
at Spire.Xls.Core.Spreadsheet.XlsWorkbook..ctor(Object, String, ExcelVersion) + 0x4c6
at Spire.Xls.Workbook.LoadFromFile(String, ExcelVersion) + 0xd2
at Spire.Xls.AOT.NLWorkbook.Workbook_LoadFromFile(IntPtr, IntPtr, IntPtr) + 0x66

Please let me know how to fix this

KallindSoni
 
Posts: 26
Joined: Tue Apr 08, 2025 1:56 pm

Thu Jul 10, 2025 6:25 am

Hello,

Thank you for your inquiry.

May I ask if you are using the latest version of Spire.XLS for Python 15.5.0 for your testing? If the issue persists even with the latest version, could you please provide us with your input files and the environment details where the error occurred (such as the OS version)? This information will help us investigate your issue more accurately and offer an effective solution.

You may upload the information as attachments or send them directly to my email: [email protected]. Thanks in advance.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 331
Joined: Mon Apr 14, 2025 3:33 am

Return to Spire.XLS

cron