• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support

Formatting Fills

Output: FormattingFills.xlsx

public void Run()
{
    var workbook = new Workbook();
    var worksheet = workbook.Worksheets[0];
    worksheet.Columns[0].WidthCharacters = 20;

    worksheet["A1"].Value = "Solid Blue";
    worksheet["B1"].Fill = CellFill.CreateSolidFill(SpreadsheetColor.Blue);

    worksheet["A3"].Value = "Green Red Dark Trellis";
    worksheet["B3"].Fill = CellFill.CreatePattern(SpreadsheetColor.Green, SpreadsheetColor.Red, PatternType.DarkTrellis);

    worksheet["A5"].Value = "Linear Gradient";
    worksheet["B5"].Fill = CellFill.CreateGradient(GradientType.Linear, 180, SpreadsheetColor.Blue, SpreadsheetColor.Red);

    workbook.SaveAs("FormattingFills.xlsx");
}
  • Improve this Doc
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX