Excel Interop delete power query

Adam Newcombe 156 Reputation points
2021-08-20T08:16:48.92+00:00

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
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,480 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,265 questions
{count} votes

Accepted answer
  1. Adam Newcombe 156 Reputation points
    2021-08-20T09:22:10.003+00:00

    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.