We have a list of Excel files that we are trying to automate through. On this list, the file names are variable, meaning they can change day to day, so we have to loop through them in order to process them..
However, the Excel Advanced Package lacks a lof of the more cosmetic functionality (row widths, colors, etc) that I have to code in so I have to use Simulate Keystrokes (Object Cloning simply does not cut it).
I'm running into 2 problems:
1.) On the headless environment, when opening Excel, the window is not active once opened. In order to write keystrokes, I have to have a window variable to address. Because the file names change frequently, unless the window is active upon opening, I have no good mechanism to assign a window object. You can't pass in a variable (like the filename) to Window: Activate's string/regex function (the entry is essentially a constant). Also, sometimes I have to have 4-5 files open as this is essentially a merge between multiple workbooks of similar names.
2.) Even if I am able to assign a window object, the base file's popups often can't be reached. Frequenlty, we have to sort, find and so on in ways AA's package can't handle. I will activate the Excel window, maximize it, do the Ctrl/Alt keystroke combination to bring up the popup and use Currently Active for simulate Keystrokes. When we run it headless, it seems to still be hidden and it's trying to apply keystrokes to the "Bot Running..." Java window that pops up.
The error message is as follows:
Unable to activate the window with this title(com.automationanywhere.botcommand.data.impl.WindowValue@17410344). Verify that the window is opened.
Does anyone know *why* my Excel spreadsheets are coming up inactive when using Excel Advanced: Open in a headless mode? I don't have any of these issues when running as a bot creator or observed on test. It's only unobserved that is running into this problem. In addition, does anyone know why the Bot Runner window either keeps being brought to the forefront or the Excel file popups aren't given active status? I can't see the specific issue given how it has to run, but it's the migration from version 11 to 360, where we didn't have this problem.