Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Importing Excel sheet as a table

Author  Topic 

goligol
Posting Yak Master

128 Posts

Posted - 2011-08-26 : 15:40:49

Does anyone can tell me how to import a excel data sheet to SQL server table list?

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-08-26 : 16:04:10
If it's a one time thing, use the import/export wizard in SSMS.

right click the target database, choose tasks, import data.
Go to Top of Page

gwilson67
Starting Member

42 Posts

Posted - 2011-08-26 : 16:53:22
Yes the wizard is the easiest way to go. You have the flexibility of saving the package if you want to reuse it again.

Greg
http://www.freewebstore.org/tsqlcoderepository
Powerful tool for SQL Server development
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-27 : 04:28:48
another way is to use OPENROWSET if you want to do it programatically

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2011-08-28 : 14:26:58
You could use the ComObject Excel.Application in Powershell and create connetion to the SQL Server object.
It's only a few lines of code

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-08-29 : 03:33:17
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -