Change Excel Cell Color

This colors the specified cells with the selected color.

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

excelDocument.Cells[x, y].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid;

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.

Last updated