How do we connect a Microsoft Excel to SQL Server

How do we connect a Microsoft Excel to SQL Server
How do we connect a Microsoft Excel to SQL Server

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
01

Fill in the server name and the user.

How do we connect a Microsoft Excel to SQL Server
02

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
03

Select Save password in file and Finish.

How do we connect a Microsoft Excel to SQL Server
04

Ready! He brought us the board entries. The Refresh All option reloads the data.

How do we connect a Microsoft Excel to SQL Server
05

We choose under Refresh All – Connection Properties…

How do we connect a Microsoft Excel to SQL Server
06

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
07

We see the data we requested with the SQL query was returned.

How do we connect a Microsoft Excel to SQL Server
08

Share it

1 thought on “Πώς συνδέουμε ένα Microsoft Excel με τον SQL Server

Leave a reply