Spire.XLS is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Fri Jun 24, 2011 10:21 pm

I have a question about border line style.
If I want to change border to only upper and down lines.
For example:


Posts: 12
Joined: Sun May 22, 2011 10:25 pm

Mon Jun 27, 2011 2:58 am

Dear ctseng123,
Thanks for your inquiry.
Here is a sample code.
Code: Select all
//all sheet style
sheet.Range.Borders[BordersLineType.EdgeTop].LineStyle = LineStyleType.MediumDashDotDot;
sheet.Range.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.SlantedDashDot;
//specify a cell
sheet.Range["B9"].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.MediumDashed;
Technical Support / Developer,
e-iceblue Support Team
User avatar

Justin Weng
Posts: 110
Joined: Mon Mar 28, 2011 5:54 am

Return to Spire.XLS