Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

importing multiple excel files

 
   Database Forums (Home) -> General Discussions RSS
Next:  Generating and running SQL on the fly  
Author Message
ciaran.hudson

External


Since: Jan 29, 2008
Posts: 4



(Msg. 1) Posted: Thu Feb 14, 2008 1:50 pm
Post subject: importing multiple excel files
Archived from groups: comp>databases>ms-sqlserver (more info?)

Hi

I have multiple excel files of the same format in a directory.
They are called book1.xls, book2.xls, book3.xls and so on.
What is the easiest way to import the tab named sheet1 from each of
the excel files to a databse using SQL server 2000 enterprise edition?

Regards,
Ciarán

 >> Stay informed about: importing multiple excel files 
Back to top
Login to vote
Plamen Ratchev

External


Since: Nov 06, 2007
Posts: 352



(Msg. 2) Posted: Thu Feb 14, 2008 6:26 pm
Post subject: Re: importing multiple excel files [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Here is a good article that outlines different methods to import Excel
sheets into SQL Server (DTS, linked server, distributed queries, client
side, etc.). Since you are dealing with multiple files it is probably best
to do it client side.

http://support.microsoft.com/kb/321686

HTH,

Plamen Ratchev
http://www.SQLStudio.com

 >> Stay informed about: importing multiple excel files 
Back to top
Login to vote
Jack Vamvas

External


Since: Aug 13, 2007
Posts: 60



(Msg. 3) Posted: Fri Feb 15, 2008 8:51 am
Post subject: Re: importing multiple excel files [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You could use the below, and then adapt if necessary to make dynamic

SELECT *
INTO MyTable
FROM
OPENROWSET('Microsoft.Jet.OLEDB.4.0'
,'Excel 8.0;Database=C:\myEXCEL.xls'
,'SELECT * FROM [Sheet1$]'
)


--

Jack Vamvas
___________________________________
Search IT jobs from multiple sources- http://www.ITjobfeed.com




wrote in message

Hi

I have multiple excel files of the same format in a directory.
They are called book1.xls, book2.xls, book3.xls and so on.
What is the easiest way to import the tab named sheet1 from each of
the excel files to a databse using SQL server 2000 enterprise edition?

Regards,
Ciarán
 >> Stay informed about: importing multiple excel files 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Importing multiple files to SQL - I have over three hundred text files that I need to import to SQL Server. Each is in the exact same format. I want to import tham as seperate tables. Is there any way to do it in one process? Regards, Ciarán

Importing from Excel problems - What do others do if you need to import excel files into SQL Server? My main problems are 1) zipcode formatting issues. If the column is a mix of zip and zip+4, I have problems retrieving all zipcodes. 2) If the last column contains NULL no information...

Need Help Importing Data from Excel to My SQL Database - Hey guys, I am trying to import data from an Excel spreadsheet into my SQL database. I am running SQL 2005. I following Microsoft's instructions for creating a linked server, and it appeared to work. However when I run this query: SELECT * INTO test...

How to import several excel files using one dts package - It's very simple import, without any data modifications; from several excel files to one table. I tried the wisard and it gives me selection for only one file. I am not used to create DTS packages and schedule jobs, so I would need some help. Thank you...

How can I produce multiple output flat files from a single.. - Hi Folks, I'm used to a UNLOAD command that allows me to dump to a named flat file the results of any SELECT statement. Hence one can build a single SQL file which contains multiple SQL statements each of which 'unloads' to its own unique file. unload....
   Database Forums (Home) -> General Discussions All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]