Excel Macro opened with Start Process, cannot readrange

I have opened a excel macro with Start Process and performed clicks etc
Now am trying to read range but do not want to open the file again.
How can I set the application scope to the same excel ?

1 Like

@preetith

Can you share your xaml to easilly address the issue.

cheers :smiley:

Happy learning :smiley:

4 Likes

dev env is not connected to internet… sorry
start process → opens excel macro → user clicks to import files etc->
all working good.
Now I want to extract data in some columns into a datatable from this file.
If I use readrange, it’ll reopen the file and that is not correct …
Please can you tell me how to read range from an open excel file ?

Hi @preetith,

Correct me if my interpretation is wrong. What I understand is , you want to execute a macro from an excel file by pressing a button attached to one of your sheets. After that you want to take some range to a datatable. If that’s your requirement, I think it’s better to go with an excel application scope , add an “invoke macro” activity to exceute your macro and an “excel read range activity” to read the range. Inside the application scope, the file will be open and you can perform any operations on it. :slightly_smiling_face:

Warm Regards,
Nimin

Thanks, I will try this method.

1 Like