Send hotkey in Excel

Want to:
a) open Excel spreadsheet - currently using Excel Application Scope
b) Select specific range - currently using Select Range
c) Send hotkey (CTRL-C)

For some reason my hot key isn’t working. Also I’m puzzling if I should have an Attach Window inside an Excel Application Scope or the other way around - or if one is completely obsolete. I’d rather not use a specific selector for my hotkey. I’d expect I could reference the output from Excel Application Scope instead?

Hi @peterelbek

just to make sure, have you already tried the Read Range activity
or you just don’t want to use it?

@reda, I am facing the same question. when using the send hot key activity and you place CTRL + C, that is not working. I am using with a read range and excel application scope.

Hi @Fer & @peterelbek

Do you want the excel sheet to be open when doing the read? You can do the reading without opening the excel by using Read Range activity. Just give the path to the excel, and the range you want it to read.

This will add the data to a datatable variable. You can then use datatable variables to filter out the data you need.
Datatable.Select("Column = 'value'")

Is this what you need to do? Or are you trying to get a cell value with a hot key?

That is not what I want to do.

I want to paste a specific range, by using the Send Hotkey activity (CTRL + V).

When I place the “V” in the key and run it, nothing is done

I believe the best way to do it is using a write range or append range.

If you are to use the write range, for the range property, you can explicitly specify the range you want to write data into… This is much better approach than hot keys I suppose…

Hmmm… Feels like @Fer is hijacking my question… :-/

@Lahiru.Fernando - specifically I want to copy with the old-fashioned CTRL-C because I have to insert the copied range into a separate app (Microsoft Dynamics NAV), that has an “Insert from Excel” feature. This can be achieved with CTRL-C and then SHIFT-CTRL-V into the app, that has a datagrid.

For some reason I can’t get this hotkey working…

You shouldn’t use attach window for excel application scope.

Hi @Lahiru.Fernando
I wanna open VB after opening Excel.
Can’t we send hotkey Alt+F11, as done manually.

Its not working.

@NiranjanKN,
For this you need to enable the developer tab in the excel, then try with that.

@sarathi125 Can’t we write a macro without doing these ?

@NiranjanKN,

To write macro we need Developers Tab, not sure that can be done without enabling the developers tab manually.

Hey. @NiranjanKN

Can you tell me what exactly you are trying to do after opening excel? IF you want to write a VB script in excel, as @sarathi125 mentioned, you need to enable the developer option in excel…

@sarathi125 @Lahiru.Fernando I’m trying to write a vbcode to merge files.