Merging values in worksheet cells in Java

Hi,

I'm doing cell merging, but when i do sum-up of cells's value, found that all the value is still attached with the merged cells.

Example :

value for A1=1

value for A2=1

value for A3=1

after i do cell.merge [cell.merge(0,0,2,0) ] and sum-up the cells [sum(A1:A3)], total is 3, where i actually want the total =1 (show only the upper-left most data).

Any idea?

Thanks.

Hi,

Thanks for providing us details.

Yes, Merging feature does not work similar to MS Excel, it should give 1 (as sum) instead of 3 implementing your scenario, we will look into it and get back to you soon.

Thank you.

Hi,

We will discuss the issue and get back to you soon. For the time being, you may set the other cell values to 0 or null (if possible) except for the top-left cell when you are merging cells.

Thank you.

Hi,

Please try the attached version. We have changed the behavior of Cells.merge() to make sure it should be same to MS EXCEL, i.e., take the first non-empty cell as the top-left cell and clear all other cells in the merged cells range.

Thank you.

Hi,

Thanks for your fast respond.

But,after i applied the new version (Aspose.Cells.jar) , there is some null pointer exception which it doesn't exist when i reverted back to the old version.

at com.aspose.cells.fU.b(Unknown Source)
at com.aspose.cells.fU.a(Unknown Source)
at com.aspose.cells.fU.y(Unknown Source)
at com.aspose.cells.fU.(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)

Any idea?

Thanks.

Hi,

Please post your simple code (with your template file if you have) here to reproduce the issue you have mentioned with the new fix v2.0.1.23, we will check it soon.

Thank you.

Hi,

After further analysis, we found an issue in v2.0.1.23 regarding merging, please try the attached version v2.0.1.24 and let us know if it works fine now.

If you still find the issue, kindly post your template file with sample code here, we will check it soon.

Thank you.

Hi,

Thank you for considering Aspose.

We have fixed you issue in the attached latest fix(Please ignore the previous fix V2.0.1.24 provided by Amjad). Please try the attached jar and let us know if it works fine for you.

Thank You & Best Regards,

Hi,

Thanks for the new fix. It works fine now in sum on merged cells.

But, there is border missing after i do the cells merging.

After cells merging, some of the borders are missing (column B,C and D) but not in column F and H as in attachment.

Any idea?

Thanks.

Hi,

Thank you for considering Aspose.

We have found your mentioned issue after an initial test. We will provide a fix for it soon.

Thank You & Best Regards,

Hi,

Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells. We have fixed your mentioned issue.

Thank You & Best Regards,

Hi,

It seems like doesn't work properly.

Pls find the codes and attached template files.

Codes:

Cells cell = book.getWorksheets().getSheet("Sheet1").getCells();
cell.merge(5, 1, 10 , 1);
cell.merge(11, 1, 14 , 1);
cell.merge(15, 1, 17 , 1);

Thanks.

Hi,

Thank you for sharing the template files. We have found your mentioned issue after an initial test. We will provide a fix for it soon.

Thank You & Best Regards,

Hi,

Please try the attached version, we have fixed your mentioned issue regarding Merging feature.

Thank you.

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


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