logo
search
Data Import & Export

How to Share an Excel Database Connection Securely

Muhammad TalhaMuhammad Talha Oct 9, 2026 868 views

Question details

The user wants to share an Excel workbook containing linked database tables without losing the connection configuration or compromising database credentials.

How to Share an Excel Database Connection Securely
Product
Microsoft Excel
Device & OS
not provided
Scenario
Sharing an Excel file with database connections among multiple users who may or may not have their own database permissions.
Observed behavior
Saved credentials do not transfer automatically, causing connection failures for recipients, and manually saving credentials for every user is impractical and poses security risks.
Before you start

Verify your organization's security policies regarding database access and ensure that intended recipients have the necessary permissions before sharing connection details.

Solution 1Recommended

Prompt Users for Credentials via Power Query

Configure Power Query to require users to enter their own credentials, ensuring secure, individualized database access.

This method is ideal when each user has their own database permissions. It prevents the need to embed sensitive passwords in the shared file.

1
Open Data Source Settings

Open your Excel workbook, navigate to the 'Data' tab on the ribbon, and click 'Get Data' followed by 'Data Source Settings'.

2
Edit Connection Permissions

Select your active database connection from the list and click the 'Edit Permissions' button.

3
Clear Saved Credentials

Under the Credentials section, click 'Edit', clear any saved login details, and set the privacy level to match your organizational requirements. Click 'Save' and 'OK'.

4
Share the Workbook

Save and distribute the workbook. When recipients click 'Refresh All', Excel will prompt them to authenticate with their own database credentials.

Prompt Users for Credentials via Power Query
Enhanced Security: By forcing credential prompts, you ensure that no unauthorized user can access the database through a shared file.
Free Microsoft Office alternative

Try WPS Office for Secure Data Management

If you are experiencing issues managing complex database connections in Microsoft Excel, consider WPS Office. It provides a lightweight, free alternative with high compatibility for standard spreadsheet formats.

Seamlessly open, edit, and save Microsoft Excel formats (.xlsx, .xltx, .csv).Easily manage imported data and spreadsheet queries.Lightweight installation and incredibly fast launch speeds.Familiar user interface makes migration effortless.
microsoft office alternative - wps office

Frequently Asked Questions

What is an ODC file in Excel?

An Office Data Connection (.odc) file stores connection information to external data sources. It allows users to share standard database connection strings without having to embed them directly into individual workbooks.

Why do other users get a connection error when opening my shared Excel file?

If 'Save password' is disabled or credentials are not shared alongside the file, Excel requires each user to authenticate. They must have their own database permissions or be provided with a secure connection template to access the linked tables.

How do users create a new file from an Excel template (.xltx)?

Users simply double-click the .xltx file from their file explorer. Excel automatically generates a new, unsaved workbook (typically named Document1) that retains all the data connections, formatting, and formulas without altering the original template file.