helpneeded2
Board Regular
- Joined
- Jun 25, 2021
- Messages
- 110
- Office Version
- 365
- Platform
- Windows
I’m not very familiar with what can be accomplished with VBA coding, or with the full export capabilities of MS SQL Server, but I would like to know if the following is possible.
Currently, we have a script that we run in MS SQL Server. After executing it, we then copy the output and paste it into a tab of a worksheet. I have a separate “mastersheet” in Excel, which I use for clicking buttons to run macros that automate the many different steps which involve separate Excel sheets.
I would like to try to automate this process as much as possible, so I want to know if VBA has the capability of interacting with the data output on MS SQL Server?
From my understanding I can not use VBA to load and execute a script file in MS SQL Server. Accordingly, I would like to do the following:
I would appreciate any guidance or suggestions on how I can best automate this process.
Currently, we have a script that we run in MS SQL Server. After executing it, we then copy the output and paste it into a tab of a worksheet. I have a separate “mastersheet” in Excel, which I use for clicking buttons to run macros that automate the many different steps which involve separate Excel sheets.
I would like to try to automate this process as much as possible, so I want to know if VBA has the capability of interacting with the data output on MS SQL Server?
From my understanding I can not use VBA to load and execute a script file in MS SQL Server. Accordingly, I would like to do the following:
- Open MS SQL and load the query file. (Will do this manually unless there is a VBA option to do this)
- Execute the query file. (Will do this manually unless there is a VBA option to do this)
- Copy the data in the MS SQL Server output window. (Will do this manually unless there is a VBA option to do this)
- Open the target Excel file.
- Paste the data result into an “Data Import” tab on the target Excel file.
I would appreciate any guidance or suggestions on how I can best automate this process.