附录1——单元格设置背景色,FillPattern枚举效果

 			cellstyle.FillForegroundColor = 10;//10代表红色
            //填充模式--必须设置
            cellstyle.FillPattern = FillPattern.SolidForeground;//充满

主要是整理,FillPattern 的各种枚举结果

FillPattern 共有枚举如下类型:
public enum FillPattern : short
    {
    
    
        NoFill = 0,
        SolidForeground = 1,
        FineDots = 2,
        AltBars = 3,
        SparseDots = 4,
        ThickHorizontalBands = 5,
        ThickVerticalBands = 6,
        ThickBackwardDiagonals = 7,
        ThickForwardDiagonals = 8,
        BigSpots = 9,
        Bricks = 10,
        ThinHorizontalBands = 11,
        ThinVerticalBands = 12,
        ThinBackwardDiagonals = 13,
        ThinForwardDiagonals = 14,
        Squares = 15,
        Diamonds = 16,
        LessDots = 17,
        LeastDots = 18
    }
枚举枚举对应的效果

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_39541254/article/details/107940224