How to set colour in particular cell range in excel

Hi, all

can you please guide with me , how to set colour in particular cell range in excel , dynamically. for example verified should be in green colour and not verified should be in red colour , so verified and not verified will be in different cell . so according to that the colour should be set.

@mohan2,

Please find below thread:

Hi @mohan2

you can use the Set Range Color activity to color your excel range based on your criteria…

i saw your flow, the problem is ,i have more loop in my master flow , so i am searching for the simple flow for set colour. but thanks for the flow you send to me .

1 Like

@mohan2,

If the excel file has headers then will provide you simple solution. Because it doesn’t have header that’s y I did like that. Any ways is it working or not ?

Lets wait for other reply and will see.

yes it is running. thanks for the flow. i should checking with simple flow.

1 Like

Hi Lakshman,

I need the cells in excel to be colored ‘RED’ wherever the bot encounters “FTP ERROR” in the cell. Can I have a solution for this…There are headers in the excel file.

@Neha2111

  1. use Read Range activity to read data from Excel and will give you output as dataTable.
  2. Then use For Each Row activity to itreate that dataTable.
    ForEach row in dataTableName
    Int Index =
    dataTableName.rows.indexOf(row)+2
    If
    row(“ColumnName”).Tostring.equals(“FTP ERROR”)
    Then use Set Range Color activity and specify color and cell range.

If it is ‘C’ column then range should be “C”+index.Tostring

I have a total of 14 columns…“FTP error” can be any column…should I do separately for 14 columns?

@Neha2111

Please check below thread and find attached xaml file for your reference.

How to set colour in particular cell in Excel

This is the way I could achieve: check this: