Data Import & Export

Share Excel SQL Server Data Connections Without Saving Passwords

Phi Hung VoPhi Hung Vo Nov 14, 2026 868 views

Question details

The user needs a way to share an Excel workbook's SQL Server connection when saved credentials are unavailable to other users.

Share Excel SQL Server Data Connections Without Saving Passwords
Product
Microsoft Excel
Device & OS
not provided
Scenario
A workbook creator wants other users to open a shared workbook and refresh its SQL Server data connection.
Observed behavior
The connection refreshes for the creator, but database credentials are not available when another user opens the workbook.
Before you start

Confirm that recipients can reach the SQL Server and have permission to read the required data. Ask your database administrator which authentication method users should use and where a shared connection file may be stored.

Solution 1Recommended

Share the SQL Server connection through an ODC file

Use an Office Data Connection (ODC) file to distribute connection settings while having each user authenticate appropriately.

An ODC file shares connection information; it does not automatically give recipients database access or preserve usable credentials for every user. Authentication and refresh behavior depend on the connection type, Excel version, and organizational security settings.

1
Locate the connection

In Excel, open the workbook and select Data > Queries & Connections. Find the SQL Server connection, then open its properties. Menu names can vary by Excel version.

2
Export the connection

In the connection properties, open the Definition tab and select Export Connection File if available. Save the ODC file to an approved shared location that recipients can access.

3
Connect recipients to the ODC file

Have each recipient open the workbook and use Data > Existing Connections to browse for and select the shared ODC file. Follow the prompts to connect or import data; exact options vary by Excel version.

4
Authenticate and test refresh

When prompted, have each user sign in with an authorized account. Then select Data > Refresh All to test the connection. If Windows authentication is configured, confirm with the administrator that each user's account has database access.

Share the SQL Server connection through an ODC file
Keep credentials secure: Avoid embedding database passwords in a shared workbook or ODC file. Check Microsoft's current external connection guidance and your organization's credential policies.
Free Microsoft Office alternative

Work with shared spreadsheets in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for opening and editing shared spreadsheets. Its Excel-format compatibility helps users move between office suites, although it does not resolve Excel's SQL Server credential behavior.

Open and edit shared spreadsheet data in a familiar interfaceCompatible with Microsoft Excel XLSX and XLS formatsFree and lightweight for everyday office workMove existing Office documents into a familiar workspace
microsoft office alternative - wps office

Frequently Asked Questions

Does an ODC file save the SQL Server password for everyone?

No. An ODC file can share connection settings, but recipients still need an approved authentication method and database permissions. Avoid embedding passwords in shared files.

Where can I export an Excel connection to an ODC file?

In Excel, open Data > Queries & Connections, open the connection's properties, and check the Definition tab for Export Connection File. Availability and menu names can vary by version and connection type.

Why can't another user refresh the shared workbook?

The user may lack network access, database permissions, or valid credentials. Ask the user to select Data > Refresh All and review any authentication prompt or error with the database administrator.

Can users refresh with their own Windows accounts?

Yes, if the SQL Server connection is configured for Windows authentication and each user's account has the required database access. Confirm the configuration with your database administrator.