Hi,
simple question:
How to a create a border around a range of cells ?
For instance, if I want to have a border around a range from A1 to C10, how to achieve this ?
Thanks
I've tried this :
WorksheetMergedCellsRegion merge = sheet.MergedCellsRegions.Add(4, 4, 15, 15); merge.CellFormat.BottomBorderStyle = CellBorderLineStyle.Double; merge.CellFormat.TopBorderStyle = CellBorderLineStyle.Double; merge.CellFormat.LeftBorderStyle = CellBorderLineStyle.Double; merge.CellFormat.RightBorderStyle = CellBorderLineStyle.Double;
sheet.MergedCellsRegions.Remove(merge);
Seems to provide the correct result..
Is there another way to do this ?
Hello,
Creating a WorksheetMergedCellsRegion seems like the correct way to go as it exposes the CellFormat for you to style the cells as you wish. Let me know if you have any other issues with this approach.
Thanks,
Chris