Excel Border from vb.net

C# sample

Hello Chris!

It was a while ago, but you may be able to use it anyway. It is a C# sample, but works.

oRng = oSheet.get_Range("A4","E4");
oRng.Font.Bold = true;
oRng.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;
oRng.Borders[Excel.XlBordersIndex.xlEdgeBottom].Color = 0;
oRng.Borders[Excel.XlBordersIndex.xlEdgeBottom].LineStyle = Excel.XlLineStyle.xlContinuous;
oRng.Borders[Excel.XlBordersIndex.xlEdgeBottom].Weight = 2;

oSheet is the WorkSheet object

Rg, Nygma
 
Back
Top