Skip to main content
Solved

How can I change the color of an Excel cell and How can I change the color of an Excel entire row?

  • 25 February 2023
  • 12 replies
  • 261 views

Good afternoon fellows

 

I need to change the color of a cell or row in Excel. Explaining:

I'm developing a task where I compare two Excel spreadsheets. If a code in a column of worksheet "A" is the same as the code in another column of worksheet "B", I need to paint the entire row of worksheet "B", or at least the cell found in worksheet "B". Can I do this with A360?

 

 

 

 

12 replies

Userlevel 5
Badge +14

@interplan 

Settings

  • Enter the name of the session used to open the workbook with the Open action.
  • Select the Active cell, Specific cell, or Cell range option to specify the cell in which to set the color. If you have selected the Specific cell option, specify the address of the cell in the Cell name field.
  • Select the item to which you want to apply the color: Cell or Text within cell.
  • Enter a cell color by name or code.

    Use either the color name or the hex value. 

Userlevel 1
Badge +7

Hi @rbkadiyam 

 

  • Enter the name of the session used to open the workbook with the Open action.

           Me: Ok, I have Opened the Workbook wiht “Default”

  • Select the Active cell, Specific cell, or Cell range option to specify the cell in which to set the color. If you have selected the Specific cell option, specify the address of the cell in the Cell name field.

          Me: Here, I didn't understand: Once the "Open" action is used, what is the next action to select the Active Cell, or a specific Cell or a range of cells? What "Action" should I use here?

  • Select the item to which you want to apply the color: Cell or Text within cell.

          Me: At this point, I think it's a continuation of the previous question: what was the "Action" used so that I can apply the color to the cell or cell text. I am not finding this option. Just a reminder: I'm using the "Community version of A360"

  • Enter a cell color by name or code.  Use either the color name or the hex value.

        Me: Well, using your instructions above (even not finding a specific "Action" for it), I selected a cell with the "Select Row/Cell/Column" action and then, I used the "Set cell" action and tried to put the Hexadecimal value . The task just writes the Hexadecimal value. Then I tried the word "Blue". It didn't work either. Then I tried another Action: "Set Cell Formula". It didn't work either, repeating the previous results.

Remembering: I am using Community version of A360.

Thanks.

Best Regards

Mauro Guimarães

 

 

 

  •  
  •  
  •  
  •  
Userlevel 5
Badge +9

@interplan 

There are packages to change Excel cell color.

https://botstore.automationanywhere.com/bot/a2019-excel-cell-color-package

 

Regards

Badge

@Raul Jaimes 

This package only takes excel path. How can I specify the worksheet name where I want to set a color?

Also, it’s not asking for any Instance as well so should we open the Excel before triggering this or this will automatically open the excel and set the color?

Would it be best if we just write a vbscript code for it? or any other method that someone is aware of please share.

 

Thanks

Userlevel 5
Badge +9

@rishabh.malhotra 

Use below bot to change the cell background color and using worksheet specifying the worksheet name. The detail here is you need open the Excel file using the Excel formatting Open action.

https://botstore.automationanywhere.com/bot/excel-formating-operations

 

Regards

Userlevel 1
Badge +7

Hi @Raul Jaimes ,

 

 

In my "Control Room" is like this. How can I make it usable? I use the "Community" version of A360?

When I create a bot and try to access the "Excel formatting Open action" action, it doesn't appear for me…

 

 

 

Thanks, in advance.

Best regards

Mauro Guimarães

Userlevel 5
Badge +9

@interplan 

Download the bot from Botstore and import it in the Control-Room. Then locate the action Excel Open 

https://botstore.automationanywhere.com/bot/excel-formating-operations

 

 

Regards

Userlevel 7
Badge +13

@Raul Jaimes ,

Importing Package in Community Edition is not possible as the default user lacks the necessary permission to do so. 

 

@interplan ,

Better option for you is to use the inline scripts like VB Script.

Userlevel 5
Badge +9

@Padmakumar 

Packages directly no. But you can imports bots.  This is how my Control-Room  Community looks like

 

 

Regards

Userlevel 7
Badge +13

@Padmakumar

Packages directly no. But you can imports bots.  This is how my Control-Room  Community looks like

 

 

Regards

 

Here, the Excel Formatting is a Custom package and not BOT. How it can be imported as a BOT?

Userlevel 5
Badge +9

@Padmakumar 

i’ve just imported the zip file  from Botstore like a bot and then the package is available. As you mention, this is a custom package.

Regards

Userlevel 1
Badge +7
It worked perfectly, as a package. Thanks @Raul Jaimes !
 

 

 

 

Reply