Link Data to external data -> "Unable to connect to the data"

M

MoBo

Hallo there,

im getting "Unable to connect to the data" when I try to execute the
following python code:

connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;\
User ID=Admin;\
Data Source=C:\\Temp\\List.xlsx;\
Mode=Read;\
Extended
Properties=""HDR=YES;IMEX=1;MaxScanRows=0;Excel 12.0;\"\";\
Jet OLEDB:Engine Type=35;
..." # copied from recording a macro in visio
commandString = "select * from 'Sheet1$'"

visio.ActiveDocument.DataRecordsets.Add(connectionString, commandString, 0,
"Sheet1") # Unable to connect to the data ?!?


Any idea why do I get this error message ?!?
 
N

Nikolay Belyh

MoBo said:
Hallo there,
im getting "Unable to connect to the data" when I try to execute the
following python code:
Properties=""HDR=YES;IMEX=1;MaxScanRows=0;Excel 12.0;\"\";\
Any idea why do I get this error message ?!?

Hallo.

I have already told you that you have invalid syntax in the connection
string, on Visio Guy's forum... I believe there is no other reason. Please
replace ALL double quotes (Properties="") with escaped quotes
(Properties=\"). Check out the following message:

http://visguy.com/vgforum/index.php?topic=226.msg4838#msg4838

Kind regards, Nikolay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top