NPOI 设置背景颜色

使用FillBackgroundColor不会起作用,不能使用自定义的颜色。

设置背景颜色代码:

HeadercellStyle.FillPattern = FillPattern.SolidForeground;
HeadercellStyle.FillForegroundColor = NPOI.HSSF.Util.HSSFColor.RoyalBlue.Index;

相关链接:

https://www.niceonecode.com/Question/20373/Unable-to-set-FillBackgroundColor-using-HSSFWorkbook-in-CSharp

https://stackoverflow.com/questions/31159724/npoi-setting-background-color-isnt-working

量变会引起质变。
原文地址:https://www.cnblogs.com/bibi-feiniaoyuan/p/14959750.html