I am trying to set the color of a given cell with the color of another cell (that is already colored in the template.
But worksheet.Cells[row, col].Style.Fill.BackgroundColor
doesn't seem to have a get
property.
Is it possible to do that or do I have to find the exact hexdecimal code of the color on the internet ?
EDIT
using the code in the answer, I get that error (it is written in French but it translate with what I wrote in my first comment)
How about something like this?
Update: Seems that if you select a color from system colors or the palette as your fill color it works fine. If you select one of the 'Theme colors' in the fill drop down
.Rgb
returns an empty stringI'm not sure it's supported... according to EPPlus Faqs :