Format cells action

The Format cells action enables you to format specific cells of a workbook.

Settings

  • Enter the session name that you used in the Connect action.
  • Use the Cell options field to select one of the following format options:
    • Active cell: Is the default selection and is used to format the current or active cell from the workbook.
    • Specific cell: Use the Cell Name field to enter the name of the cell from the workbook.
    • Multiple cells: Use the Cell range filed to specify the range for of all the cells from the workbook that you want to format.
  • (Optional) Select Font check box to change the font specifications of the content such as name, size and color.
  • (Optional) Select Alignment check box to change the vertical or horizontal alignment of the content.
  • (Optional) Select Wrap Text check box to change the default text wrap option of the content.
  • (Optional) Select Merge Type check box to choose from various merge options.

Example using Format cells action

Before you create a bot ensure you have a spreadsheet with some sample data in Google Drive. If you do not have any sample data, you can use the following Employee data set to copy to a Google Sheet in your Google Drive.
First name Last name Address Date of Birth Job tile
Roy Doe 120 Jefferson St. Riverside 7 March 1979 IT_PROG
Shaun McGinnis 220 Hobo Av. Rocky Point 29 April 1988 FI_ACCOUNT
John Mark 124 Jefferson St. Riverside 12 January 1990 SA_HEAD
Sophie Tyler 7300 Terrace "At the Plaza" Rd. Wells 9 April 2003 IT_PROG
Stephen Mathew 22 Theressia St.Troy 5 August 1999 IT_PROG
Anne Ross 9th St.Lexington 19 September 2000 IT_PROG
Perform the following steps:
  1. Create a new bot.
    1. On the left panel, click Automation.
    2. Click Create new > Task Bot .
    3. In the Create Task Bot window, enter GoogleFormatCell_bot name for the bot.
    4. Accept the default folder location: \Bots\

      To change the default bot storage location, click Choose and follow the prompts.

    5. Click Create and edit.
  2. Double click or drag Connect action.
    1. From the Actions panel, find and add Google Sheets > Connect action to the Bot editor.
    2. In Username, select Insecure string and enter the email ID associated with OAuth connection you have set up.
    3. Enter Default in the Session name field.
    4. In OAuth2 Authentication Mode, select Control Room managed. See Connect action for Google packages.
    5. Click Pick and select the connection you have configured in Control Room.
    6. Save the changes.
  3. Double click or drag Open spreadsheet action.
    1. In Username, select Insecure string and enter the email ID associated with the OAuth connection.
    2. Enter Default in the Session name field.
    3. Select From URL option to open the spreadsheet by URL that contains Employee Data in Google Drive.
    4. Select the Specific sheet name option and enter the Employee Data sheet name.
  4. Double click or drag Format cells action.
    1. Enter Default in the Session name field.
    2. In the Cell options field, select Multiple cells option and A1:E1 in the Cell range field.
    3. Select Font check box to change the font specifications as:
      • Font Name: Times New Roman
      • Font Size: 20
      • Font color: blue
  5. Double click or drag Close action to save and close the current spreadsheet. Enter Default in the Session name field.
  6. Double click or drag Disconnect action.
    1. In Username, select Insecure string and enter the email ID associated with the OAuth connection.
    2. Enter Default in the Session name field.
  7. Click Saveand run the bot.

    You will see the following format changes in the Employee Data workbook.

    Using Format cell action