Aspose Excel 單元格合並后邊框顯示不全


        /// <summary>
        /// 解決合並后的單元格沒有邊框,設置合並單元格格式,讓合並過的單元格中每一個單元格上都添加上加邊框的樣式
        /// </summary>
        /// <param name="cells">單元格</param>
        /// <param name="firstRow">起始行</param>
        /// <param name="firstColumn">起始列</param>
        /// <param name="rowNumber">行偏移量</param>
        /// <param name="columnNumber">列偏移量</param>
        /// <param name="style">樣式</param>
        private void SetCellStyle(Cells cells, int firstRow, int firstColumn, int rowNumber, int columnNumber, Style style)
        {
            int totalRow = firstRow + rowNumber;
            int totalColumn = firstColumn + columnNumber;
            for (int i = firstRow; i < totalRow; i++)
            {
                for (int j = firstColumn; j < totalColumn; j++)
                {
                    cells[i, j].Style = style;
                }
            }
        }

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM