sqlstud
SSCrazy
Points: 2527
More actions
June 26, 2012 at 10:54 pm
#271757
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
vijayarani87.s
SSC Eights!
Points: 890
June 26, 2012 at 11:48 pm
#1505974
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$]')
June 27, 2012 at 12:02 am
#1505980
Thanks for the reply...
Forgot to mention..
Have to use SSIS Package to load the data
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply