Share via

Excel Interop delete power query

Adam Newcombe 156 Reputation points
Aug 20, 2021, 8:16 AM

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,491 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,313 questions
{count} votes

Accepted answer
  1. Adam Newcombe 156 Reputation points
    Aug 20, 2021, 9:22 AM

    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: Newest

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.