using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; // create instance of HSSFWorkbook HSSFWorkbook workbook = new HSSFWorkbook(); // create new cell style ICellStyle style = workbook.CreateCellStyle(); // set the background color of cell style.FillForegroundColor = IndexedColors.Green.Index; // set the font color of cell style.SetFont(new HSSFFont() { Color = IndexedColors.White.Index }); // apply the style to cell cell.CellStyle = style;In this example, we are using NPOI library package for creating a new instance of ICellStyle interface in a workbook. We are initializing the workbook and creating a new cell style with a green background color and white font color. The style is then applied to a cell in the workbook. Package/Library: NPOI (NuGet package: NPOI)