This post is related to
Shape objects and cells with data validation issues
When using Cells 7.0.2, we noticed that some merged cells get either unmerged or the merge got extended to the right. Unfortunately, we can’t replicate this issue with a simple file, nor were we able to find a rule to these changes. Basically, we got different results for the same input data on different runs.
We set the value in the merged cell by calling setValue for the cell at the top-left position. For example, if we had the merged cells B2:C4, I would set the value on the B2 cell.
Is this the correct way to do it?
You can access all the cells which are merged together by using the following pseudo code
//Access all the cells which are merged by calling
Range rng = cell.getMergedRange();
//Then access all the cells using range iterator;
The following code will explain you who to use range.iterator to access all the cells falling inside the range.
Iterator allCells = rng.iterator();
Cell nextCell = allCells.next();
//Print cell value
We are afraid we need your template file and code to reproduce the issue. At least please give us your generated Excel files with different results (for merged areas etc.) first, so we can check whether we can get some clues from them.
I managed to replicate the issue with a simple sample.
Book1.xls is the template file, output-7.0.2.xls is the output we get. It also has the issues highlighted.
Please try the new fixed version: v188.8.131.52 (attached). We have fixed the issues.<o:p></o:p>
Also, please use removeAt(int/String) method of WorksheetCollection, e.g
Change your line of code to:
// Remove the template sheet from the file
After I upgraded to the attached version of Cells, we no longer have the merging issues.
The issues you have found earlier (filed as CELLSJAVA-xxxxx) have been fixed in this update.