Forum Discussion
Victor_Sotnikov
Aug 21, 2025Copper Contributor
To call a VBA script from a T-SQL procedure
I have the following (unusual) task: I need my T-SQL procedure to somehow call a VBA script. The VBA should copy all content of a certain sheet of an input Excel file into a certain sheet of an o...
rodgerkong
Aug 22, 2025Iron Contributor
I think you can write a powershell script, it recieves excel path as parameter. In the script, you can open excel and call vba functions. Then run the powershell script in SQL Server by call xp_cmdshell.