How to add backround color/cell color in Gsheet

Hi all,

I would like to know how one can add background color to gsheet cells in UiPath. or is there a way to format a data table and add background color, then write the datatable to gsheet?

Basically, what I want to do is so that every time information is appended to gsheet, its done so with a different color to have a visual division of the appended data for identification.

Hi @Sidney_Vogel ,

You can try applying a rule under conditional formatting for a certain column to fill the color of the cell based on some conditions.(ex.fill it with green, if bot types ‘Yes’ in it)

It will appear like this

image

Thanks

Hi, thank you for your reply, how ever i need to apply a color fill to all the rows, in a gsheet from UiPath studio.

Hi @Sidney_Vogel,

you can add background color to Google Sheets cells in UiPath by using the “Set Range Color” activity from the “UiPath.GSuite.Activities” package. Here are the steps to do it:

  1. Open your UiPath project and add the “Set Range Color” activity to your workflow.
  2. In the “Properties” panel, configure the following properties:
  • “Range”: Enter the range of cells that you want to apply the background color to, in A1 notation (e.g., “A1:C5”).
  • “Color”: Choose the background color that you want to apply to the cells.
  1. If you want to apply the same background color to multiple rows or columns, you can use a “For Each Row” or “For Each Column” activity to loop through the rows or columns and apply the color to each one.

Alternatively, you can format a data table in UiPath and add background color to the rows, and then write the data table to a Google Sheet. Here are the steps to do it:

  1. Create a data table in UiPath and populate it with data.
  2. Use the “Add Data Row” activity to add the rows to the data table. For each row, you can set the “BackColor” property to the background color that you want to apply.
  3. Once you have formatted the data table, use the “Write Range” activity to write the data table to a Google Sheet. When you do this, the background color that you applied to the rows in UiPath will be preserved in the Google Sheet.

Hi @ABHIMANYU_THITE1 thank you for your solution, however even though I have the “UiPath.GSuite.Activities” package installed, I can’t find such activity for Gsheet, only for excel, Any ideas as of why i am not seeing this activity?

Did anyone find a solution to change the font colour and background colour using Gsuite activities?