We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Too Many Validation Cells Corrupts File

I am upgrading Aspose Cells for Java from version 2.5.3 to version 8.5.1 in my company’s application. After the upgrade we are seeing corrupted files returned when our results include validation on over 1021 individual cells. Version 2.5.3 handled this scenario just fine. I’ve attached code to reproduce the problem and an example of the corrupted file.


Also, for clarity; given the design constraints of our application we cannot accept an answer that is just to validate fewer cells or to combine cell areas. In our real application we may have individual non-contiguous cell areas that have the same validation.

If this is intentional behavior I’d like a link to the release notes where this feature was changed and the correct way to implement this.

Thank you for any help you can provide.

-Dylan Gulick
Jama Software


Hi Dylan,


Thank you for sharing your code snippet.

We have evaluated the presented scenario while using the latest version of Aspose.Cells for Java 8.5.1, and we are able to notice the said problem. The resultant XLS file cannot be loaded in Excel without repair, however, if we save the results in XLSX format, the Excel application can load it correctly. We have logged this incident in our bug tracking system under the ticket CELLSJAVA-41427 for further investigation. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Thank you, Babar. I look forward to hearing from you when this issue is resolved.


-Dylan Gulick
Jama Software

Hi Dylan,

Thanks for your posting and using Aspose.Cells.

Sure, once the issue is resolved we will update you by posting in this thread and provide you a fix to download and try at your end. Hopefully, you issue will be fixed within couple of weeks. In case, the issue is difficult to be resolved then it might take longer.

Hi,


We have evaluated your issue further. I think you need to refine your code segment a bit. Please simply add one range for the area and change the sample code as the
following:
e.g
Sample code:

for(int i=0; i
< 1022; i++) {<o:p></o:p>

Cell cell = worksheet.getCells().get(i, 0);

cell.setValue("CellValue"+i);

}

validation.addArea(CellArea.createCellArea(0,0,1021,0));

I have tested your scenario/ case by updating the code segment as above and it works fine for XLS file format now.

Thank you.

Hello Amjad.


As I stated in my original post; our requirements do not allow us to combine all of the Cells we want validated into a single CellArea, as they could be non-contiguous. We need to be able to add more than 1021 individual CellAreas into a Validation, like we were able to do in previous versions of Aspose Cells. Thank you, and I look forward to this defect being resolved.


-Dylan Gulick
Jama Software

I’ve attached to this comment updated steps to reproduce and a corrupted result that show more clearly my requirements around non-contiguous validation areas. Thank you.


-Dylan Gulick
Jama Software

Hi,


Thanks for providing us further details, template file and sample code.

I have logged your concerns against your issue “CELLSJAVA-41427” into our database. We will look into your issue and investigate it on our end. We will try to figure it out soon.

Once we have any update on it, we will let you know here.

Thank you.

Hi Dylan,


This is to inform you that we have fixed the problem logged earlier as CELLSJAVA-41427 in our database. With changes in place, if one validation contains too many individual CellAreas while saving in XLS file format, the API will automatically split it to several validations. Moreover, the API has added SaveOptions.MergeAreas property. When this property is set to true, the API will try to merge those individual CellAreas before saving the file.

Please note, the fix will be available with next release of Aspose.Cells for Java. As soon as the aforesaid release is available for public use, we will notify you here along with the download link to the upgraded Jar.

Excellent, thank you for the quick turnaround! I look forward to getting my hands on the next release when it is available.


Thanks again.

-Dylan Gulick
Jama Software

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hello Babar. I have tested out the latest version 8.5.2 of Aspose Cells for Java with the fix for this issue, and I’m happy to report that the issue is indeed resolved. Unfortunately I have also noticed in my testing that using cell validation and using the new MergeAreas property both vastly increase the file size of the resulting excel document, and correspondingly the time to open the file in excel increases dramatically.


In my testing my file went from 308kb with just under 1000 cell areas in a validation to 2.85mb in with just over 1000 cell areas in a validation to 8.12mb with the SaveOptions.MergeAreas option enabled.

Unfortunately this means we will be unable to take advantage of these fixes in 8.5.2.

-Dylan Gulick
Jama Software

Hi Dylan,

Thanks for your feedback and using Aspose.Cells.

Please provide us some console application (runnable sample code) which should show this problem with the latest version: Aspose.Cells for Java 8.5.2 and improvement with the older version so that we could provide it to product team for investigation and fix to deal with the new issue of increased size.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan