Re: importing multiple excel files -
02-15-2008
, 02:51 AM
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
<ciaran.hudson (AT) gmail (DOT) com> wrote
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 |