具有Exceed / DocX的表格单元格上的阴影图案

时间:2018-08-22 10:05:53

标签: excel npoi novacode-docx

我正在将Excel表数据传输到MS Word中,并使用Excel工作簿的NPOI和Exceed / DocX来填充单词模板文档(当时NPOI无法重复使用和现有的单词模板文档/单词文档,因此我使用的是Exceed / DocX,

我能够在Exceed / DocX Word Table单元格上设置底纹颜色,但是无法设置图案。

引用:

  1. 可以设置单元格的底纹颜色,但不能设置底纹#264 https://github.com/xceedsoftware/DocX/issues/264

  2. 来自NPOI的模式。 https://github.com/tonyqus/npoi/blob/master/main/SS/UserModel/FillPattern.cs

    命名空间NPOI.SS.UserModel {

    /**
     * The enumeration value indicating the style of fill pattern being used for a cell format.
     * 
     */
    public enum FillPattern : short
    {
    
        /**  No background */
        NoFill = 0,
    
        /**  Solidly Filled */
        SolidForeground = 1,
    
        /**  Small fine dots */
        FineDots = 2,
    
        /**  Wide dots */
        AltBars = 3,
    
        /**  Sparse dots */
        SparseDots = 4,
    
        /**  Thick horizontal bands */
        ThickHorizontalBands = 5,
    
        /**  Thick vertical bands */
        ThickVerticalBands = 6,
    
        /**  Thick backward facing diagonals */
        ThickBackwardDiagonals = 7,
    
        /**  Thick forward facing diagonals */
        ThickForwardDiagonals = 8,
    
        /**  Large spots */
        BigSpots = 9,
    
        /**  Brick-like layout */
        Bricks = 10,
    
        /**  Thin horizontal bands */
        ThinHorizontalBands = 11,
    
        /**  Thin vertical bands */
        ThinVerticalBands = 12,
    
        /**  Thin backward diagonal */
        ThinBackwardDiagonals = 13,
    
        /**  Thin forward diagonal */
        ThinForwardDiagonals = 14,
    
        /**  Squares */
        Squares = 15,
    
        /**  Diamonds */
        Diamonds = 16,
    
        /**  Less Dots */
        LessDots = 17,
    
        /**  Least Dots */
        LeastDots = 18
    }
    

    }

0 个答案:

没有答案