How to load data from Multiple tabs in excel to different tables

  • Hi,

    I have an Excel sheet with 7 tabs. Each sheet contain different columns(Not same metadata).

    Need to load the data to 7 tables from this sheet.

    Can you please let me know how to do this?

    Regards

    SqlStud

  • You need to do like this

    INSERT INTO [dbo].[TableName] ( Column1 , Column2 )

    SELECT *

    FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',

    'Excel 8.0;Database=C:\TableName.xls',

    'SELECT * FROM [Sheet1$]')

  • Thanks for the reply...

    Forgot to mention..

    Have to use SSIS Package to load the data

    Regards

    SqlStud

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply