# Change Excel Cell Color

This script will require adding **using OfficeOpenXml;** to the namespaces section.

```csharp
excelDocument.Cells[x, y].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid;
excelDocument.Cells[x,y].Style.Fill.BackgroundColor.SetColor(0,0,0,0);
```

{% hint style="info" %}
The ExcelWorksheet variable has to be open using the “Open excel workbook” action before initializing the C# script.

After the C# script action, use “Close excel workbook” to save the changes made.
{% endhint %}
