Hoiw to set the color in excel cell?

I need to set the color in updated status column, If the updated status is success means I need to set
green color in that cell and if it is in fail status means i need to give red color.
As per my script, success and fail will change in that updated status column.
Can anyone guide me how to do this ?

1 Like


You can use the Set Range Color activity within the Excel Application Scope for this purpose.

1 Like

Okay, how I need to give success status is green color and fail status is red color.


Maybe you could create the excel file from a template that has been saved somewhere and do the conditional formatting on that template. When you populate that excel sheet the formatting you want will be there.


There are different logics you can use.

One is using a for each row and checking if the status is “success” Then Set Range Color to green, else Set Range Color to Red.

The other way will be to do a DataTable.Select([Uploaded Status] = “fail”) and then apply the Set Range Color to Red on the resultant output and similarly for Success.

1 Like

That’s a very useful tip. Thanks!

1 Like

no probs

Hi @jamunatj ,

Here is the document for the set color range.


1 Like

Hi Jamuna Ji,

I hope this demo helps:

Hi @SowmyaLeo

That is not working Can you please elaborate