
According to the website, add the code
((HSSFSheet) sheet). SetEnclosedBorderOfRegion (region11 NPOI. SS. UserModel. BorderStyle. Thick, NPOI. HSSF. Util. HSSFColor. Black. The Index); Perform error

The code is as follows:
The static IWorkbook wk=new a XSSFWorkbook ();
ICellStyle cellStyle=wk. A CreateCellStyle ();
CellRangeAddress region11=new CellRangeAddress (1, 2, 9, 10);
Sheet. AddMergedRegion (region11);
Row1. CreateCell (9). SetCellValue (" Alarm ");
Row1. GetCell (9). The CellStyle=styleTopBorder;