How to set background color for google sheets of selected range

I have a scenario where I want to set the background color of the entire row of a Google Sheet based on a specific condition of one of the columns in the Google Sheet. The output should look like attached screenshot

image

Hi @Kshitij_Sonawane

  1. Authenticate with Google Sheets:
    Use the GSuite Application Scope activity to authenticate with your Google account.

  2. Read the Data from Google Sheets:
    Use the Read Range activity to read the data from the Google Sheet into a DataTable.

  3. Loop Through the DataTable:
    Use a For Each Row activity to loop through each row of the DataTable.

  4. Check the Condition:
    Inside the loop, use an If activity to check the specific condition for the column.

  5. Set the Background Color:
    If the condition is met, use the Set Range Color activity to set the background color of the entire row.

image

Here, you can change which color you want it → System.Drawing.Color.Green, System.Drawing.Color.red etc…

Regards,
Gowtham K

@Kshitij_Sonawane

Welcome to the community

if you need to set color in google sheet then first the activities present would not work…

you might need to go with api and custom code

instead you can setup conditional formatting in the sheet itself so that based on the values you update the color automatically changes

cheers

Hi @Gowtham_K115,
Thank you for your response. the Set Range Color activity is specifically designed for Excel files and does not work with Google Sheets.

Hi @Anil_G , thank you for your reply. I’m still trying to find a suitable custom formula for conditional formatting but haven’t been successful. If possible, could you please provide me with a dynamic formula that would work for my needs?

@Kshitij_Sonawane

I beleive based on status you want to change…if so create using that field only

cheers