Home > Net >  NPOI set merged cell borders show is not complete
NPOI set merged cell borders show is not complete

Time:05-24

DDD combined set cell borders show only half

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;
  •  Tags:  
  • C#
  • Related