Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel sheet prompting for SQl Login Credentials

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.

like image 569
Dharmendra Avatar asked Feb 23 '12 13:02

Dharmendra


People also ask

Why is my Excel sheet asking for a password?

So if you open a spreadsheet that you know doesn't have a password, yet you get a screen like this, it means that Excel is trying to link to and get information out of a spreadsheet that is password protected. If it is purposeful then you need to get the password and work with it.

How do you prevent Excel users from connecting to SQL Server?

1. To avoid connection through Excel/ODBC, the way is to disable or not create the logins for the users that attempt to connect SQL Server through Excel/ODBC. Then, create the special logins for the users that connect SQL Server from the Access Front-end, the web application and Reporting Services respectively.

How do I save Excel SQL credentials?

To save the SQL Server password for a Microsoft Query database connection, right click anywhere in the Excel table and select Table > External Data Properties. Click the Connection Properties icon, Definition and check Save Password.

How do I create a SQL connection in Excel?

To connect Excel to a database in SQL Database, open Excel and then create a new workbook or open an existing Excel workbook. In the menu bar at the top of the page, select the Data tab, select Get Data, select From Azure, and then select From Azure SQL Database.


1 Answers

I have solved it using the following the steps.

  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 window, 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 "Definition" tab on the Connection Property Pop up.
  7. Edit the connection string and Add User id and password in the connection string and mention the User id and password you had created on step 1.
like image 179
Dharmendra Avatar answered Oct 07 '22 21:10

Dharmendra