简体   繁体   中英

Powerpivot data connection will not save the password

I'm trying to create a Powerpivot workbook with data that users can refresh themselves before analysis. We don't have Powerpivot data refresh in.

When I create a Powerpivot data connection to SQL server using SQL Server Authentication (unchanging read-only username and password), and checking the box to save the password, the connection works fine for refreshing the data as long as I leave the workbook open.

If I close the file and re-open it, the password is gone from the data connection and the user cannot refresh the data.

I've tried configuring the data connection with the SQL native client provider and the SQL OLEDB provider and I see exactly the same results.

The connection string gets built with Persist Security Info=True and the Password shows up as hidden text (dots). It stays this way through refreshes as long as the workbook is open. However, once I close the file and re-open it, the connection string no longer has the Password parameter listed at all, not even as hidden text. Persist Security Info is still there and set to True. As might be expected, the connection string does not have the information needed to access the SQL Server instance.

This type of connection string using SQL Server Authentication still works fine with the password saved when used directly as an Excel data connection, or when used as a data source in Reporting Services. It's only Powerpivot where the password gets blown away.

Is there a workaround for this issue?

Yes, there is one. Rename your excel to .zip file. Excel files are just a zip file with a different extension. Open your file.zip and search for the file connections.xml, edit it and add "Password=yourpassword" in your connection string. Save and make sure the file gets updated inside the zip. Change the .zip back to .xlsx and open again. Now the password should stay there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM