Click Cell In Excel

I need to do following steps:

  1. Click excel cell X2.
    2.Copy value
  2. Select range X2:dt.rows.count.toString
    4.Press Enter
    Is there any Invoke Code for this.
    I Also need to know the in, out arguments for Invode code.
    Thanks
1 Like

Hi
We can do with simple send hot keys
—Like use START PROCESS activity and pass the file path of the excel file as input to FILENAME property
—it will open the file where now use a SEND HOT Key Activity with key as ctrl+g
—now type as x2 with type into activity and use Click activity to click go
—now the cursor will go to that cell and then use a send hot key activity with key as ctrl+end

It’s like how we do with keyboard alone inside the excel

Cheers @devops

1 Like

Thanks @Palaniyappan , ctrl+g thing works but I am looking for a vba code to do this.

1 Like

Yah we can do that as well
Where in excel I under Data option click on Record Macro option and do all the manual steps and stop the recording as well
Then in the same option click on edit macro and copy the script and paste that in txt file
—now read the txt file with READ TEXT FILE activity and get the output with a variable of type string named str_input
—now pass that string variable to INVOKE VBA activity as input
And we nee to use this INVOKE VBA activity inside the EXCEL APPLICATION SCOPE
This will execute vb script in that excel file

Cheers @devops