SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Import Excel Spreadsheet


Import Excel Spreadsheet

Author
Message
Clkgtrs1
Clkgtrs1
SSC Veteran
SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)

Group: General Forum Members
Points: 242 Visits: 10
Can anyone tell me how to import an Excel spreadsheet into SQL so that the contents of the spreadsheet form an entire table in SQL please?
homebrew01
homebrew01
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45610 Visits: 9231
Right click your database -> Tasks -> Import Data -> Source: MS Excel -> File Path -> Destination

That gets you to the general area. Then you have a variety of options depending on your needs.

You can also save it as an SSIS package if you will be doing the same tasks frequently.



Clkgtrs1
Clkgtrs1
SSC Veteran
SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)SSC Veteran (242 reputation)

Group: General Forum Members
Points: 242 Visits: 10
Hey Thank you for the help but when I right click the database I don't have the option to import data into my database. I'm running SQL Server Management Studio Express 2005 is there an upgrade that I should perform?
WayneS
WayneS
SSC Guru
SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)

Group: General Forum Members
Points: 79218 Visits: 10970
Clkgtrs1 (10/1/2010)
Hey Thank you for the help but when I right click the database I don't have the option to import data into my database. I'm running SQL Server Management Studio Express 2005 is there an upgrade that I should perform?

It should be under the Tasks sub-menu.

You can also use the OpenRowSet / OpenDataSource functions:
SELECT * 
INTO dbo.MyNewTable
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=C:\test\xltest.xls', [Customers$])



Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
Links: For better assistance in answering your questions, How to ask a question, Performance Problems, Common date/time routines,
CROSS-TABS and PIVOT tables Part 1 & Part 2, Using APPLY Part 1 & Part 2, Splitting Delimited Strings

crazy4sql
crazy4sql
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16550 Visits: 4604
other alternate is use linked server.

edit:-
follow this linke on how to configure
http://support.microsoft.com/kb/306397

----------
Ashish
homebrew01
homebrew01
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45610 Visits: 9231
Clkgtrs1 (10/1/2010)
Hey Thank you for the help but when I right click the database I don't have the option to import data into my database. I'm running SQL Server Management Studio Express 2005 is there an upgrade that I should perform?


Sorry, I'm not familiar with Management Studio Express 2005



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search