EasyXLS

Cell border settings

EasyXLS™ library enables you to apply borders around the Excel cells, rows, and columns or diagonal borders. A variety of border styles and border colors can be set for the spreadsheet cells.

For better performances, the best option is to apply the border setting to the style of the cell, row, or column by using ExcelStyle class. But the formatting can also be applied directly to the cell, row, or column.

Border around cell

EasyXLS provides multiple predefined border styles. The below source code sample shows how to apply top and bottom borders for a cell style from the Excel file. The gray color is set for the borders.

C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python

Diagonal border in cell

EasyXLS allows you to set diagonal borders for cells. The below source code sample shows how to apply diagonal borders for a cell style from the Excel file. The gray color is set for the borders.

C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python

Available for: Professional, Excel Writer
Go to top

EasyXLS Excel libraries:

.NET
.NET Excel Library
full .NET version to import, export or convert Excel files
COM+ Excel Library
full COM+ version to import, export or convert Excel files
-
Java
Java Excel Library
full Java version to import, export or convert Excel files
Download EasyXLS™ Excel Library for .NET and Java

File formats:

Office 365
MS Excel 2021 - 2025
MS Excel 2007 - 2019
MS Excel 97 - 2003
XLSXXLSMXLSBXLS
XMLHTMLCSVTXT