Share Excel SQL Server Data Connections Without Saving Passwords
Question details
The user needs a way to share an Excel workbook's SQL Server connection when saved credentials are unavailable to other users.

- 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.
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.
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.
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.
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.
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.
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.

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.

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.




