//创建一个字体颜色
            IFont font = hssfworkbook.CreateFont();
            //红色
            font.Color = HSSFColor.Red.Index;

            //样式
            ICellStyle style = hssfworkbook.CreateCellStyle();
            //给样式设置字体
            style.SetFont(font);

            rowHeader.GetCell(0).CellStyle = style;

注意:如果直接设置单元格的font会导致多个单元格全部改变

相关文章:

  • 2021-07-09
  • 2022-02-27
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2022-01-16
相关资源
相似解决方案