Comment modifier la couleur de fond d’une cellule Excel en utilisant C# ?
Changer la couleur des cellules dans Excel avec C#
Re: Changer la couleur des cellules dans Excel avec C#
Avec EPPlus :
ws.Cells[1, 1].Style.Fill.PatternType = ExcelFillStyle.Solid;
ws.Cells[1, 1].Style.Fill.BackgroundColor.SetColor(Color.Yellow);
Avec Interop :
Excel.Range range = worksheet.Cells[1, 1];
range.Interior.Color = ColorTranslator.ToOle(Color.Yellow);