using System; using System.Text; using System.IO; using NPOI.HSSF.UserModel; using NPOI.HSSF.Util; using NPOI.HPSF; using NPOI.POIFS.FileSystem; using NPOI.SS.UserModel; namespace SetBorderStyleInXls { class Program { static void Main(string[] args) { InitializeWorkbook(); Sheet sheet = hssfworkbook.CreateSheet("new sheet"); // Create a row and put some cells in it. Rows are 0 based. Row row = sheet.CreateRow(1); // Create a cell and put a value in it. Cell cell = row.CreateCell(1); cell.SetCellValue(4); // Style the cell with borders all around. CellStyle style = hssfworkbook.CreateCellStyle(); style.BorderBottom= CellBorderType.THIN; style.BottomBorderColor= HSSFColor.BLACK.index; style.BorderLeft = CellBorderType.DASH_DOT_DOT; s