Select file that already open

Hi Guys,

I need your help,

I create robot to copy data (and also format of report) from macro file to excel file.
file A is macro file… it has menu 1 and menu 2
file B is Excel file… it has sheet 1 for menu 1 and sheet 2 for menu 2

The step are:

  1. i open and login to file A and click menu 1, select all data and then click copy
  2. I open file B and choose sheet 1 and then click paste
  3. I select file A (without login again) and click menu 2, select all data and then click copy
  4. I select file B and choose sheet 2 and then click paste

that I want to ask is how to select file that has been open before (step number 3 and 4).

thanks in advance for your help

@zonda_rugmiaga

You can use Element exist to identify whether it is open or not

If open You can use Attach Window activity

Hope this helps

Thanks

1 Like

Thanks @ksrinu070184 for reply.
what element that I need to identify whether open or not for my case?
could you help me to give sample? I still confuse to use element exist and attach window activiy.

@zonda_rugmiaga
I would assume that you are working with the Excel Application Scope Activity for opening the file. This has an output called Workbook. This returned variable can be used further works with the particular Excel. Have a look here:

Output

  • Workbook - The entire information from the Excel spreadsheet stored in a WorkbookApplication variable. This variable can be used in another Excel Application Scope activity. Only WorkbookApplication variables are supported.

Use Existing Workbook

  • ExistingWorkbook - Use the data from an Excel file that was previously stored in a WorkbookApplication variable. Only WorkbookApplication variables are supported.

Also with Windows (Attach window) we have the same possibility to output and to use later for further processing in the same way.

1 Like

Thanks @ppr , i use start process to open excel.
after I try, i can use attach window to open active excel file.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.