GemBox Support Forum

Incorrect borders after copying merged cells


With latest version the borders of merged range are not copied correctly.

With this sample code:

var ef = new ExcelFile();
var ws = ef.Worksheets.Add("1");
var range = ws.Cells.GetSubrangeAbsolute(1, 1, 2, 2);
range.Merged = true;
ws.Cells[1, 1].Style.Borders.SetBorders(MultipleBorders.All, SpreadsheetColor.FromArgb(0,0,0) , LineStyle.Thin);
range.CopyTo(1, 4); 

only borders of top left cell is set.

With version it worked OK.

Just found out, that in version it was also still OK.


We managed to reproduce the issue and are currently working on it.
We will notify you after we fix the issue.


Please try again with this bugfix:


Does this solve your issue?

I seems to work OK now. Thanks a lot for super fast response.

When can we expect official bug fix for it?

We usually release cumulative bug-fix every month or so (see our BugFixes page), so it will probably be released next week.


This merged cell borders issue was resolved and the fix is now available in the latest publicly released bugfix version for GemBox.Spreadsheet.
Visit our BugFixes page or NuGet.