Tuesday, 29 January 2013

VB.NET , C# EXCEL.Interop - define thick line programmatically

 osheet.Range("O1", "O10").Borders(Excel.XlBordersIndex.xlEdgeLeft).LineStyle = Excel.XlLineStyle.xlContinuous

You can specify continuous line, but to specify thick line just assign number 7 twice

 osheet.Range("O1", "O10").Borders(Excel.XlBordersIndex.xlEdgeRight).LineStyle = 7
osheet.Range("O1", "O10").Borders(Excel.XlBordersIndex.xlEdgeRight).LineStyle = 7
This is not very elegant way to do it, but I don't have time to investigate further.
Probably number 7 should be replaced by something else.

More info:


and here:

No comments:

Post a Comment