How do we connect a Microsoft Excel to SQL Server
![How do we connect a Microsoft Excel to SQL Server](https://www.dataplatform.gr/wp-content/uploads/2020/06/dp_excel_sqlserver.png)
- How can we connect Oracle Database to SQL Server using Oracle Gateway on Linux - 1 July 2024
- How do we automate the process of checking the integrity of databases in SQL Server without using a maintenance plan - 10 May 2024
- How can we connect Oracle Database to SQL Server using Oracle Gateway on Windows - 5 April 2024
The Excel of Microsoft although we use it every day and it is one of the most well-known and oldest Microsoft programs, it hides many possibilities.
In this article we will see how to connect a base of it SQL Server with Excel without ODBC and without even having to enter a code since this particular method allows us to save it inside the document.
First, open Excel and go to Data – From Other Sources – From SQL Server
![How do we connect a Microsoft Excel to SQL Server](https://www.dataplatform.gr/wp-content/uploads/2020/06/1-ems.png)
Fill in the server name and the user.
![How do we connect a Microsoft Excel to SQL Server](https://www.dataplatform.gr/wp-content/uploads/2020/06/2-ems.png)
We select the table we want although we can write a query afterwards and change it.
![How do we connect a Microsoft Excel to SQL Server](https://www.dataplatform.gr/wp-content/uploads/2020/06/3-ems.png)
Select Save password in file and Finish.
![How do we connect a Microsoft Excel to SQL Server](https://www.dataplatform.gr/wp-content/uploads/2020/06/4-ems.png)
Ready! He brought us the board entries. The Refresh All option reloads the data.
![How do we connect a Microsoft Excel to SQL Server](https://www.dataplatform.gr/wp-content/uploads/2020/06/5-ems.png)
We choose under Refresh All – Connection Properties…
![How do we connect a Microsoft Excel to SQL Server](https://www.dataplatform.gr/wp-content/uploads/2020/06/6-ems.png)
By selecting Save password, the password to access the database can be saved in Excel.
Of course we do not forget for security reasons to create users with minimum rights exclusively for this use.
By selecting Command Type in SQL we can write SQL in the Command text field.
![How do we connect a Microsoft Excel to SQL Server](https://www.dataplatform.gr/wp-content/uploads/2020/06/7-ems.png)
We see the data we requested with the SQL query was returned.
![How do we connect a Microsoft Excel to SQL Server](https://www.dataplatform.gr/wp-content/uploads/2020/06/8-ems.png)
Very interesting and useful post.