Hello,
I use a program to export data in an Excel file and I want to manipulate these data in Excel before saving the Workbook. After clicking on the "Export" button in the program, an Excel window with a standard and fixed name is automatically opened with all data in a single Worksheet. What I want to do is attach this window to BP so that I can manipulate the data before saving the workbook as a new file.
I tried to use the Attach action of the MS Excel object provided with BP, which is basically calling the "Open Instance" action. The problem is that Excel takes a significant time to start and to load the data so the object ends up creating a new instance and doing the manipulation on this new empty Workbook.
As a potential solution, I tried to use the "Wait For Process" action of the "Utility - Environment" object. But since Excel takes time to load the data, a new instance is still created. So I added a static timer before the "Open Instance" to force BP to wait longer. In addition to be an ugly fix it is also very unstable.
My last stand was to copy the MS Excel object and customize it. In the new object, I used the application manager to identify Excel with the window name and the process name and I specified that the application will already be running. The idea behind this was to take advantage of the fact that the window has a fixed name. So I could take control of the window, save the file and reopen it with the standard object to perform the manipulations. When it came to saving the Workbook, I noticed that the generated file was empty because a new instance was still generated.
I'm out of idea and any input would be really appreciated.
PS: I use BP v5 on a physical machine running windows 10.
EDIT: The editor of this forum doesn't seem to recognize my returns. A fix for this problem would also be appreciated! ;)