How to set cell color programmatically epplus?
Check your line: if (dtdata.Rows[4].ToString() == “Annual Leave”) If it is a standard .net table wouldnt .ToString() evaluate to “System.Data.DataRow”? Also ws.Cells[“E1”] will need to be adjusted for each cell after looping through the row count (basically what krillgar was saying). Something like that: [TestMethod] public void Cell_Color_Background_Test() { //http://stackoverflow.com/questions/28679602/how-to-set-cell-color-programmatically-epplus //Throw in some data var … Read more