i’ve seen other posts related to this exception, but none seem to apply to my use case. I get this when opening an existing xls file from disk using code like this:
Aspose.Cells.Workbook finalWkbk = new Workbook();
finalWkbk.Open(tempFileNameWithFolder);
It only happens for some reports. i attached 1 report that is throwing this exception. Any help would be appreciated.
I think you are using Aspose.Cells for .NET. After an initial test, I can find the issue (I got error upon loading the file: Source array was not long enough. Check srcIndex and length, and the array’s lower bounds) as you have mentioned. I used the following code with v5.3.2.2:
Sample code:
String filePath = “e:\test2\ScreenReport_186437324_1107790086_585888276_Batch1_of_3.xls”; Workbook workbook = new Workbook(filePath);
I have logged your issue with an id: CELLSNET-26309. We will fix it soon.
Awesome! I will test out this version and hopefully patch it to our Production environment soon. I’ll reply to this thread to let you know how it goes. sorry for not replying sooner, I thought i would get an email when someone replied rather than having to login and find my post again. But I’m happy with the quick response, so thanks again.
We have recently released another fix version of Aspose.Cells for .Net v5.3.2.4. Please perform your testing using this latest version and do share your feedback with us.
Thanks. I was currently trying to get the previous version you posted up and running but am running into issues with licensing. we are currently using version 4.8 but I see the new version is 5.3.x. will our current license file work with a version 5.x dll?
It seems the 5.x version included other changes that would require a bunch of code changes on our end in order to just compile some of our assemblies that reference aspose.cells. Can you update the 4.8 dll with this fix? This is causing errors for a bunch of our clients, and getting the 5.x dll tested and out soon is not realistic.
I am afraid, we don't have the policy to include functionality or to provide fix for some older versions. You have to use our latest fix for your issue, there is no other alternative.
For your knowledge, with the release of Aspose.Cells for .NET v5.0.0, we reorganized the API classes for Aspose.Cells component. This change has some major aspects that we follow. We have added new namespaces. The entire API (classes, interfaces, enumerations, structures etc.) were previously located in the Aspose.Cells namespace. Now, certain sets of API have been moved to their relative namespaces, which make the relationship of classes (with their members) and namespaces clear and simplified.
We have also renamed some existing API and you need to make some adjustments in your existing projects accordingly to work with new version(s).