I have 2 files. Main excel and tepmplate. Template contains macros.
I am calling the macros in Main excel using the Execute Macro activity. It causes the template file to open as well. This is causing error in performing activities on Main excel. Any reason why the template file is opening , and how I can prevent it from opening.
You have defined Excel Application Scope for Main excel file or Template excel file ?
Macro is in template file or Main excel file?
Macros are in template. I am calling it as " ‘templatePath’ ! MacroName " (no spaces)
Scope is on Main excel file
Can you try to add an separate Excel application scope for Template excel file alone and uncheck the visible option in properties pane.
What is what you want to achieve, perhaps you can avoid to use Macros if its reordering data, vlookups, concatenate…
I think it might not be a uipath thing, is the macro opening the second document or are you opening with uipath? are you using application.visible = true in any way…
sometimes when you open the workbook with uipath and open another workbook with macros will open two instances of Excel.
please share your files.