How can I change cell style in an Excel file with ExcelLibrary?

后端 未结 3 1878
南笙
南笙 2021-02-05 19:34

Can anybody help me with ExcelLibrary? I\'d like to set a cell background and font color, but I don\'t know how can I do it. I try to get access to a cell style, but I didn\'t f

3条回答
  •  孤街浪徒
    2021-02-05 20:09

    I don't tested this but it seems that you the cell has a property called "Style" which defines the cellstyle. Here you can set the background color for a specific cell.

    worksheet.Cells[0,0].Style.BackColor = Color.CornflowerBlue;
    

提交回复
热议问题