importing multiple excel files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ciaran.hudson@gmail.com

    importing multiple excel files

    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
  • Plamen Ratchev

    #2
    Re: importing multiple excel files

    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.



    HTH,

    Plamen Ratchev


    Comment

    • Jack Vamvas

      #3
      Re: importing multiple excel files

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

      SELECT *
      INTO MyTable
      FROM
      OPENROWSET('Mic rosoft.Jet.OLED B.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@ gmail.comwrote in message
      news:2f484cc3-2aaf-4a40-b1d9-5c96560f4358@e6 g2000prf.google groups.com...
      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


      Comment

      Working...