Source array was not long enough. Check srcIndex and length- and the array's lower bounds

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.

Thanks.

This message was posted using Page2Forum (attachment) from Aspose.Cells for .NET - Documentation

Hi,

Thanks for reporting your problem.

The latest Aspose.Cells for Java version works fine.

I could not reproduce the problem with Aspose Cells for Java
v2.5.2.13
.

Please see the code below and the output file.

Java


String filePath=“F:\Downloads\ScreenReport_186437324_1107790086_585888276_Batch1_of_3.xls”;


Workbook workbook=new Workbook();

workbook.open(filePath);


workbook.save(filePath + “.out.xls”, FileFormatType.EXCEL97TO2003);

Hi,

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.

thank you.

Hi,

We have fixed this bug. Please download Aspose.Cells
for .NET v5.3.2.3
.

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.

Hi,


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

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?


Thanks again for your help.

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.

Hi,

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).

For complete reference, please see the Programmer's Guide and API Reference of Aspose.Cells for .Net.

Hi,

Please also see this post relating to how to proceed from your older version to newer version.

The issues you have found earlier (filed as 26309) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.