Tuesday, October 27, 2015

Using Excel 2016 to connect to a SQL Server Database

To connect to a SQL SERVER database in Excel:

1) Follow instructions to make sure the database engine is running here:
http://edgallagher.blogspot.com/2015/10/start-sql-server-2012.html
2) Open Excel 2016, select Data > From Other Sources > From SQL Server


3) This will prompt you to enter a Server Name.
4) Start up SQL Server Management Studio.  Copy the Server Name from the connection, and Paste into the excel prompt.



5) If The authentication uses Windows Authentication, select the same for excel, otherwise enter the login and password from SQL Server.
6) Select 'Next'.
7) Select the database you are interested in from the dropdown, and select the tables you would like to use.  This portion can be modified later.
8) Select 'Next'
9) This process will create a connection settings file, Fill out as needed.
10) Finally, select what your final output should be.  Whether to view the data via Table, or to input into a pivot table Report.

Start SQL Server 2012

This starts the database engine so when you open SQL Server Management Studio it can connect to the database.

Go to Start > Control Panel > Administrative Tools > Services
Scroll down to SQL Server(SQLEXPRESS), Right click, and select 'Start'