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

Free Support Forum - aspose.com

Cells lose format after row deletion

Hello,

We are experiencing yet another issue with Aspose Cells 7.0.2.3 (JDK 5).
We fill an existing blank template XLS file, which involves duplicating a sheet, deleting some rows from each copy and other operations.

If we duplicate that sheet more than once, the first copy is ok, but in all other copies some cells lose their formatting and their data validation.

I’ve attached our template and the output file of this code:

Workbook wb = new Workbook(“template.xls”);
WorksheetCollection wss = wb.getWorksheets();
Worksheet ws = wss.get(“Reco 1.00.1”);
for(int i = 0; i < 2; i++) {
int newIndex = wss.addCopy(ws.getIndex());
Worksheet newWs = wss.get(newIndex);
newWs.setName(“Copy-” + (i + 1));
newWs.move(ws.getIndex());
newWs.getCells().deleteRows(39, 81, false); // If I remove this, the issue is gone.
}
wss.removeAt(ws.getIndex());
wb.save(“output.xls”);

In the uploaded example, you can see the formatting issue on rows 49, 63 and others.
One cell with data validation issues is F70 in the filled template and F151 in the blank template.
Other cells are I102-104 and K102-104 in the filled template and I183-185 in the blank one.

It seems that only cells situated under the rows I delete are affected. Formatting and data validation set to cells above the delete point seem to be untouched.

Regards,
Sorin.

Hi,


Thanks for providing us the template files.

After an initial test, I can find the issue as you have mentioned. I have logged a ticket with an id: CELLSJAVA-40023. We will look into it soon.

Thank you.

Hello Amjad,

What is the current status of this issue?

Regards,
Sorin.

Hi,


The issue is under process (we are working on the issue), once it is resolved, we will let you know and provide you the fix here.

Thank you.

Hi,


Please try the attached fixed version v7.0.2.5, we have fixed your issue.

Thank you.

Hi,

The fix works for the sample, but in our full code it is not completely fixed.

The
data validation issue no longer occurs, but some formatting is still
lost. It happens in less places than before. I uploaded a screen-shot of
the issue (it’s on row 50 and nowhere else in the file) and as soon as I
can reproduce it in a sample, I will upload it too.

Regards,
Sorin.

Hi,


Yes, we need sample with template file(s), so we could evaluate your issue further.

Thank you.

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