0
votes

I have used below procedure code but its throwing an error:

Code:

SELECT * into TestTable FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=D:\ExamCenter.xls;HDR=YES;IMEX=1;', 'SELECT * FROM [user$]')

error:

OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "Unspecified error". Msg 7303, Level 16, State 1, Line 1 Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".

1
can you share the actual code you are running? - No Idea For Name
i have to create table based on excelsheet data structure, means columns of table decided based on excelsheet data. - Manish Mishra

1 Answers

0
votes

Please use the following link to find an example

Import Export example