Support Portal

for ProcessRobot and WinAutomation

Start a new topic
Answered

Work with already open Excel

We have a program that generates/opens Excel.

How de we get that, already open, Excel into an Excelinstance that WinAutomation can work with ?


Best Answer

Use Attach to Running Excel - action and it attached by excel file name.


Answer

Use Attach to Running Excel - action and it attached by excel file name.

Hi!
So I tried to attach it with the wildcard method "*Excel" but: "No Excel Document found named as *Excel" although it is open and it is the only worksheet that is open. 


I'm running on Windows 10, Office 365 Pro Plus

The Attach actions does not accept wild cards, so you need to specify he full path to the Excel File.

So how to does the Attach Actions attach to an already running excel document that was exported from a 3rd party system and can't be located in a download folder?

Does the action accept variables in the path?

Shannon,

yes, you can include variables in the path

it is generally better to use a set variable action before and specify the full path to the excel file there to make it easy to debug and view what values were substituted into the variables and the path name.


Example 1:


1. Set  %ExcelDoc% = ExcelFileName.xlsx

2. Attach to Excel

Action input
Document Name:     C:\Users\Desktop\Username\\%ExcelDoc%
 .... Note:  \\ before variable; name, else a \% (a backslash before a %) means you are specifying the literal % symbol and not start of a variable.

Example 2:

1. Set  %ExcelDoc% = ExcelFileName.xlsx

2,  Set %ExcelPath% =  C:\Users\Desktop\Username\\%ExcelDoc%

3. Attach to Excel

Action input
Document Name:  %ExcelPath% 

Login or Signup to post a comment