Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Error while importing to excel Expand / Collapse
Author
Message
Posted Friday, August 16, 2013 11:33 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 3:52 AM
Points: 131, Visits: 248
Hi,
I am trying to import sample data into excel,using following code,but it gives me following error,


Create Table Test
(
a Varchar(2),
b Varchar(2)
)

Insert Into test
values ('ab','bc')


insert into
openrowset('microsoft.ace.oledb.12.0',
'excel 12.0; database= D:\test' ,
'SELECT * FROM [Sheet1$]'
)select * from test




Msg 7399, Level 16, State 1, Line 2
The OLE DB provider "microsoft.ace.oledb.12.0" for linked server "(null)" reported an error. The provider did not give any information about the error.

Msg 7303, Level 16, State 1, Line 2
Cannot initialize the data source object of OLE DB provider "microsoft.ace.oledb.12.0" for linked server "(null)".
Post #1485437
Posted Monday, August 19, 2013 6:39 AM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, April 14, 2014 11:49 AM
Points: 739, Visits: 2,470
avdhut.k (8/16/2013)
Hi,
I am trying to import sample data into excel,using following code,but it gives me following error,


Create Table Test
(
a Varchar(2),
b Varchar(2)
)

Insert Into test
values ('ab','bc')


insert into
openrowset('microsoft.ace.oledb.12.0',
'excel 12.0; database= D:\test' ,
'SELECT * FROM [Sheet1$]'
)select * from test




Msg 7399, Level 16, State 1, Line 2
The OLE DB provider "microsoft.ace.oledb.12.0" for linked server "(null)" reported an error. The provider did not give any information about the error.

Msg 7303, Level 16, State 1, Line 2
Cannot initialize the data source object of OLE DB provider "microsoft.ace.oledb.12.0" for linked server "(null)".

You need to specify an excel file.

You currently only have
database= D:\test





The SQL Guy @ blogspot

@SeanPearceSQL

About Me
Post #1485767
Posted Monday, August 19, 2013 11:30 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: 2 days ago @ 2:53 PM
Points: 3,733, Visits: 7,072
This is a duplicate post
http://www.sqlservercentral.com/Forums/Topic1485438-391-1.aspx


______________________________________________________________________________
"Never argue with an idiot; They'll drag you down to their level and beat you with experience"
Post #1485920
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse