question

AdamNewcombe-4862 avatar image
0 Votes"
AdamNewcombe-4862 asked AdamNewcombe-4862 answered

Excel Interop delete power query

Hi,

Is it possible to delete a power query via Excel interop? Or stop it refreshing?

My process is Open spreadsheet, Refresh all (get the latest data from SQL Server), Delete connections, send to internal customer.

But I do not want the power query to still be there.

Alternatively is there a different option from power query (and VAB) to call a SQL Stored proc.

Thanks

sql-server-generaloffice-scripts-excel-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AdamNewcombe-4862 avatar image
0 Votes"
AdamNewcombe-4862 answered

Hi,

Sorry. This is straight-forward. Amend a connection from table to sql to call a stored proc. My existing code will work, which deletes all connections in an excel workbook.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.