ClosedXML.Report
ClosedXML.Report copied to clipboard
Merged cells getting unmerged for nested range
As you can see in the attached image:
Cells in the template are merged. After filling the Report the right part of the cells aren't merged anymore.
The left parts of the table is keeping the merge settings.
.
To avoid this Problem I actually use a workaraound that adds a Dummy-Property {{item.Dummy}} that is filled with a whitespace right next to the last merges cells on the right.
OP make sure your range includes the merged cells. Make sure it's not just A-I but A-Y. I have a similar setup to you and am not seeing this issue.
I am seeing a similar issue to this though. Merged cells BELOW the nested range in the outer range do not get their merged status pushed down with the cells. Furthermore Excel reports a corrupt data in the file, specifically merged cells.
I will appreciate if you attach a template and provide some reproduction code so I could investigate the issue.
Sorry, but actually I'm not involved to the project where I was using ClosedXML anymore. If I will return to this project, or use ClosedXML on another project in future, I can take the time to recreate the sample and also add the code. But to be honest, there shouldn't be much more information about. I'm just inserting variables into the report as described in the documentation. It is only affecting the last merged cells inside of a line, so I create a workaround by adding a dummy variable right of the last cells.