How to send hotkey to an excel file for decreasing decimal button for specific columns

Hi there,

I have a problem with my end report. There are two columns of double numbers which have 6 digits after decimal point. I need them with 2 digits after decimal points but cell value can not change. So I need to send hot key for “decreasing decimal” in excel. Shortkey is “alt+H+9” for this.

When open excel in visible mode then i attached to it. I am using Select Range activity for this 2 columns and sending 2 hot keys. First one is alt+h and the second one is 9. However it is writing “9” in the first cell so it doesnt work.
Any idea for solving this problem or another solution?

Thanks a lot.

@Alperen_Tac - 1. You need to send hotkey 4 times to reduce the decimal points to 2 digits…

  1. Could you please share the screenshot of the sendhotkey activity?
  2. If you are allowed to modern design, i would suggest to do so. So that, you can use Keyboard shortcuts and send this in one shot.

Update: I selected a column/Range manually and tried clicking ‘Decrease Decimal’ and it is not working. Its working only if you select one cell. Please double check.

@Alperen_Tac - You can also use this activity in the for each loop and pass the row(Columnname)

image

Thanks for your answer bro, If there is a string like your column name, decreasing decimal is not working. I am selecting just values wtihout any string. Here is my hotkeys screen shots.
image
First hotkey’s properties:


Second hotkey’s properties:

I didnt get how to use this activity. Can you explain a little more? :slight_smile:

I need to send hotkey when this shortcuts appear.
image

@Alperen_Tac - Please check this…

Input

image

Output
image

Note: Row(0) - 0 means by first column …you can provide your columnname also as row(“Number”)

Thanks for your reply but in this solution, my cell values are changing. For example: A2 value is 34.123456. I need to see 34.12 but my value in this cell is need to be 34.123456.

@Alperen_Tac - Yup i got it…that is changing the cell value too. Here is the solution using UiAutomation.

Excel_UiA_Keyboard.zip (359.4 KB)

Note: I have used Modern Design activities. To activate that, go to settings ==> Design ==> Under Design Style Turn on Use Modern for New projects…

@Alperen_Tac - Did you get a chance to try the provided workflow? If yes and it worked, please mark my post as solution , that will close this thread.