Solved

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

Posted on 2012-03-14
3
256 Views
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).

Thanks.
0
Comment
Question by:ndidomenico
  • 2
3 Comments
 
LVL 6

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.
4.select 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
8.There are two AUTHENTICATION, select the SQL SERVER AUTHENTICATION and give the USERNAME & PASSWORE
9.Select the DATABASE and then click next
10.select "COPY DATA FROM ONE OR MORE TABLES OR VIEWS" then click next
11.the Sheets in your excel file will be showed here
12.select the sheet which you want to insert and then click next
13.select the "EXECUTE IMMEDIATELY" check box and then click next
14.click finish
15.it takes some time to process and finallY, if there are no mistakes,it executes
successsfuly else it shows the error message
0
 

Author Comment

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

Accepted Solution

by:
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.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
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 …

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now