Power Query Problems

How to Share Power Query Data Without Exposing Queries or Sources

Natalie TaylorNatalie Taylor Oct 23, 2026 870 views

Question details

The user needs to share a workbook connected to SQL Server via Power Query so others can refresh filtered data, but without allowing recipients to see the underlying query structure or database connection details.

How to Share Power Query Data Without Exposing Queries or Source Data
Product
Microsoft Excel
Device & OS
not provided
Scenario
Sharing dynamic reports with external or internal users who need the ability to refresh the data themselves without gaining unauthorized visibility into backend database architectures.
Observed behavior
By default, Excel Power Query does not prevent workbook recipients from opening or modifying the query. Users with database access may also be able to view the raw source data, creating a security and privacy risk.
Before you start

Ensure you have the necessary permissions to set up intermediate data sources, such as a designated SharePoint site, OneDrive folder, or a Power BI Pro license, before attempting to secure your queries.

Solution 1Recommended

Use an Intermediate Workbook on SharePoint or OneDrive

Extract the data to a master file stored securely in the cloud, and provide users with a secondary workbook that queries the master file rather than the SQL database.

Because Power Query in Excel cannot hide connection strings or query steps from users, you must decouple the final report from the SQL database. An intermediate file acts as a secure buffer.

1
Create the Master Workbook

Open a new Excel workbook, connect it to your SQL Server via Power Query, and load the required data. Save this workbook to a secure SharePoint or OneDrive location.

2
Restrict Access

Configure the sharing settings on the Master Workbook in SharePoint/OneDrive so that only authorized administrators can view or edit it.

3
Create the User Workbook

Open a second, blank Excel workbook. Go to the Data tab, select 'Get Data', and connect to the Master Workbook stored on SharePoint/OneDrive (using the Web or Excel Workbook connector).

4
Share the User Workbook

Distribute this second workbook to your end users. When they click 'Refresh All', it will pull data from the intermediate file without exposing the original SQL Server connection details or query steps.

Use an Intermediate Workbook on SharePoint or OneDrive
Scheduled Refresh: You will need to ensure the Master Workbook is refreshed regularly so the end users pull the most up-to-date information when they refresh their User Workbook.
Free Microsoft Office alternative

Try WPS Office for Secure and Lightweight Data Management

Dealing with advanced Power Query security limitations in Microsoft Excel can be complex. For everyday data analysis, reporting, and secure document sharing without the heavy overhead, WPS Office provides a lightweight, highly compatible alternative. It supports robust file encryption and seamless spreadsheet handling.

  1. 1. Download and Install: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Open Your Spreadsheets: Launch WPS Spreadsheets and seamlessly open your existing .xlsx or .csv files without losing formatting.
  3. 3. Secure Your Files: Use the built-in encryption features under the Menu > File > Encrypt option to securely password-protect your data before sharing.
Free, lightweight, and easy-to-use spreadsheet applicationHighly compatible with Microsoft Excel (.xlsx, .xls, .csv) formatsBuilt-in document encryption to protect sensitive data before sharingFamiliar user interface for seamless migration and quick adoption
microsoft office alternative - wps office

Frequently Asked Questions

Can I password protect just the Power Query connection in Excel?

No, Excel does not currently offer a native feature to password-protect or hide individual Power Query connections or query steps from users who have access to the workbook.

Will hiding the worksheet protect my underlying SQL data?

Hiding the worksheet containing the loaded data does not protect the query itself. Users can easily unhide the sheet or open the Power Query Editor to view the source details and connection strings.

Does saving the Excel file as static values solve the security issue?

Yes, if the recipient does not need to refresh the data themselves, you can copy and paste the query results as static values or export the report to PDF. However, this removes the dynamic refresh functionality for the end user.