Hi Marina,
Glad to know that I was able to clarify the question earlier. Coming to the second question, you should not set up connection multiple times if your sheets are present in the same excel file. Ideally, if you are using the update query that I have given you all the operations will be done in a single Execute action. The line of actions will be as:
First use 'Set Connection' action, then go ahead and use the 'Open' action, then use 'Execute' action and at the end use the 'Close' action.
Now if you are using the queries separately as it seems from your latest thread, then you only need use 'Set Connection' action once then use an 'Open' action. Post this you can use 'Get Collection' action and then again use 'Execute' action within a loop if your query executes only for a single row at a time and then go ahead with 'Close' action.
If you had multiple excel files like one excel file had a source sheet and the target sheet was included in some other excel file then such kind of a logic can be used where you can open and close the connections individually.
Also, one thing to note if you are opening and closing connections consecutively add a delay in between in form of a 'Sleep' action from 'Utility-Environment' VBO. Sometimes the closing a connection takes time and if you try to open the connection again by the time it hasn't been closed some unknown issues might occur.
The error you are indicating can be due to multiple reasons, like some error with the connection string, if it is in a wrong format or of the file mentioned is not proper. Error in the Query format if the name is not written within proper brackets or there is a issue with syntax.
Also as I said just in the above paragraph, this can also occur because of consecutive opening and closing of the connection with the same excel file without any delay in between.
Since you haven't provided the screenshots or the snippets of both your connection string or query format, it is bit difficult to point the exact source of the issue.
But all in all to answer your question, try doing all this operation within one open and close connection block.
------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily
Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website:
https://devneet.github.io/Email: devneetmohanty07@gmail.com
----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.