cancel
Showing results for 
Search instead for 
Did you mean: 

Excel VBO - Creating Extra Code Stages

john.hammond
Level 6
Morning all.

I'm in need of formatting a range of cells within an Excel document - font type, size, unbolding etc. I can see that unbolding is an option on the Extended VBO, but not for amending the font. If I were to go about creating additional code stages to add this functionality (and bear in mind that I'm a complete novice with minimal coding experience in Python), is there some sort of guide that outlines the available functions, sub-routines and arguments that can be called? Or (and my fingers are very crossed here!), has somebody already made code stages that already add this functionality?

Cheers!

------------------------------
John Hammond
------------------------------
1 BEST ANSWER

Helpful Answers

Hi John, creating your own actions with inspiration from the "Bold Font" action is doable.

For example, if you want to change the font, you can duplicate the action and add the following input: FontName

In the codestage, you map the input and pass it to the Font.Name code.

You can do this for all the font properties, see attached.

7223.png
7224.png
7225.png
7226.png


------------------------------
Mats Holm Pettersson
RPA Specialist
WillisTowersWatson
Europe/Copenhagen
------------------------------

View answer in original post

3 REPLIES 3

Hi John, creating your own actions with inspiration from the "Bold Font" action is doable.

For example, if you want to change the font, you can duplicate the action and add the following input: FontName

In the codestage, you map the input and pass it to the Font.Name code.

You can do this for all the font properties, see attached.

7223.png
7224.png
7225.png
7226.png


------------------------------
Mats Holm Pettersson
RPA Specialist
WillisTowersWatson
Europe/Copenhagen
------------------------------

Thank you Mats! I was trying to do similar to what you suggested but using the 'Format Cells in Range' action from the standard Excel VBO, but this made much more sense to me and was actually quite simple! 

------------------------------
John Hammond
------------------------------

Thanks @Mats__Pettersson for sharing the code stage. It's really helpful​​

------------------------------
Manpreet Kaur
Manager
Deloitte
------------------------------