Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I Have an Excel Sheet where i had created an pivot table which is taking data from Sql Table.I am downloading that Excel sheet from an Application to Client machine and when we try to open it in clint machine, it is asking for the SQl Server Login Credentials.
Is there any way so that after downloading to client machine the sheet will not prompt for SQL Login Credentials and we will hardcode or Set in Excel itself.
The User just open or download and as he open the pivot the Datasourse will not prompt for SQl Login and Refresh the Datasource automatically.
Posted

1 solution

I had solved by doing some manipulation .

1. Create a user in SQl Server and give permission to that user for the desired database.
2. Open Excel->Click on "Data" Tab
3. Click on Existing Connection.A pop up will appear.
4. On the top of the pop up wimdow, you find "Connections in this Workbook".Right click on it.
5.Click on Edit Connection Property.
6. Connection Property Pop up will Appear.Click on the "Defination" tab on the Connection Property Pop up.
7. Edit the connection string and Add User id and passwowrd in the connection string and mention the User id and password you had created on step 1.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900