问题
We have created an excel in which shows data generated from SQL Server using power query, and want to share it with other users. The excel refreshes all tables using VBA's ThisWorkBook.Connections.("QuerName").Refresh to run all queries.
The Problem is that: When we share this excel to co-workers from other departments, the excel requires new users to enter UserName and Password for SQL database instead of use the Username and Password we entered during creating this excel.
We found that Microsoft doesn't allow us to embed the database UserName and Password in Powerquery/VBA, and the Microsoft Query is not working. We are wondering if there is any way we could allow other users to refresh the data (run the query) directly instead of entering UaserName and Password.
Any suggestions would be highly appreciated.
来源:https://stackoverflow.com/questions/60925717/how-to-allow-other-users-to-run-power-query-which-generates-data-from-sql-serve