Store Excel data in a SQL Server table and link Excel to this DB

Posted on 2012-03-14
Last Modified: 2012-06-27
I have data in a Excel spreadsheet that I would like to store in a table in SQL Server 2008 (or maybe Sql Express 2005) and then be able to access this data in SQL from Excel on some pc's.
How do I:
1) Create the appropriate table in SQL Server
2) Copy the data from Excel to this SQL Table
3) Be able to access this Sql table data from an Excel spreadsheet (on any pc).

Question by:ndidomenico
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

by:Peter Kiprop
ID: 37720686
Hi ndidomenico,

1.You need to create a database in ms sql server.
2. In the excel format to the column headers appropriately i.e the way you need it to appear in the table and save
3. Go to SQL server management studio express and right click on the database already created. TASKS and then select IMPORT DATA after clicking
this one dialog box will appear,click NEXT
5.Choose microsoft Excel as DATA SOURCE,then BROWSE your saved excel file then click NEXT
6.Choose the DESTINATION (Your SQL server)
7.Select the SERVERNAME
9.Select the DATABASE and then click next "COPY DATA FROM ONE OR MORE TABLES OR VIEWS" then click next
11.the Sheets in your excel file will be showed here the sheet which you want to insert and then click next the "EXECUTE IMMEDIATELY" check box and then click next finish takes some time to process and finallY, if there are no mistakes,it executes
successsfuly else it shows the error message

Author Comment

ID: 37720747
Thanks so much Pthepebble. Very detailed, super ! Now, how do I access this SQL table from an Excel spreadsheet ?

Accepted Solution

Peter Kiprop earned 500 total points
ID: 37724077
On your excel sheet go to data menu and select from other sources then click on from sql server.

Enter the servername and select the credentials as expected and click on next.

on the next screen select your database and table as created previously.

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question