Power Query Problems

Can Excel Power Query Store Database Credentials in a Workbook?

Emma BrownEmma Brown Nov 22, 2026 869 views

Question details

The user wants to share an Excel workbook that runs Power Query database queries without distributing database usernames and passwords.

Can Excel Power Query Store Database Credentials in a Workbook?
Product
Microsoft Excel Power Query and Microsoft SQL Server Express 2016
Device & OS
not provided
Scenario
An organization shares a workbook containing queries that execute SQL Server stored procedures on multiple computers.
Observed behavior
Power Query asks for database authentication again when the workbook is opened on another computer.
Before you start

Confirm that the other computer can reach the SQL Server Express instance and that the user has permission to run the required stored procedures. Ask the database administrator which authentication methods are supported.

Solution 1Recommended

Configure Power Query Credentials on Each Computer

Use Data Source Settings to authorize the workbook's database connection on each computer where it will be refreshed.

Power Query does not securely embed reusable database credentials in the workbook. Credentials must be configured for the user or environment that runs the queries.

1
Open Data Source Settings

On the other computer, open the workbook in Excel and select Data > Get Data > Data Source Settings.

2
Select the SQL Server source

Under Data sources in current workbook, select the SQL Server connection and choose Edit Permissions.

3
Set the credentials

Under Credentials, select Edit, choose the authentication method approved by your administrator, and enter the required information.

4
Refresh the queries

Select Data > Refresh All and confirm that the queries can run the required stored procedures.

Configure Power Query Credentials on Each Computer
Credentials are not shared with the workbook: Saving and sending the workbook does not transfer the locally configured database credentials to another computer.
Free Microsoft Office alternative

Work With Excel Workbooks in WPS Office

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and Microsoft Office format compatibility for an easier move between office suites. It does not change Excel Power Query credential handling; verify advanced query compatibility before migrating a workbook.

Open and edit compatible Microsoft Excel XLSX and XLS files.Use a familiar spreadsheet interface for everyday workbook tasks.Work with shared spreadsheet data without relying on embedded database passwords.Use a lightweight office suite for documents, spreadsheets, and presentations.
microsoft office alternative - wps office

Frequently Asked Questions

Can I save a SQL Server password inside an Excel workbook for other users?

Power Query does not support securely embedding reusable database credentials in the workbook. Configure credentials through Data > Get Data > Data Source Settings on each computer, or use an approved organizational authentication method.

Why does Power Query ask for credentials on another computer?

The workbook contains connection and query information, but the locally configured credentials do not travel with it. The other user must configure an approved authentication method for the data source.

Can Windows authentication avoid sharing a database password?

Yes, if SQL Server and the organization's network support it. An administrator must grant the users' Windows identities access, after which users can choose Windows in the data source's credential settings.

Will a gateway let Excel Desktop refresh without credentials?

Not automatically. A gateway can support centralized access through compatible services, but it is not a general replacement for configuring an Excel Desktop connection. Ask your administrator whether a supported service-based architecture fits the workflow.