Aspose.Cells设置单元格背景色

Aspose.Cells设置单元格背景色_第1张图片

Aspose.Cells.Style rowBg2 = wb.Styles[wb.Styles.Add()];
rowBg2.Borders[BorderType.TopBorder].LineStyle = CellBorderType.Thin;
rowBg2.Borders[BorderType.BottomBorder].LineStyle = CellBorderType.Thin;
rowBg2.Borders[BorderType.LeftBorder].LineStyle = CellBorderType.Thin;
rowBg2.Borders[BorderType.RightBorder].LineStyle = CellBorderType.Thin;           
rowBg2.ForegroundColor = System.Drawing.Color.SpringGreen;                   
rowBg2.Pattern = BackgroundType.Solid;.

Aspose.Cells.Range range1 = cells.CreateRange(0, 0, 1, 11);
range1.ApplyStyle(rowBg2, new StyleFlag() { All = true });

你可能感兴趣的:(Aspose.Cells,C#,Aspose.Cells)