Import Excel to SQL Server 2008

前端 未结 4 995
广开言路
广开言路 2021-01-04 20:41

I need to create a process to import a multi tabbed excel spreadsheet into SQL Server 2008R2. Each tab will be a different table in the database. This will need to be done w

4条回答
  •  独厮守ぢ
    2021-01-04 21:02

    There is a nice article by microsoft - http://support.microsoft.com/kb/321686 - that outlines the processes involved.

    The process is simply

    SELECT * INTO XLImport3 FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
       'Data Source=C:\test\xltest.xls;Extended Properties=Excel 8.0')...[Customers$]
    

    Where XLImport3 is the table you want to import into and the datasource is the excel sheet you want to import from.

提交回复
热议问题