I receive a strange error in trying to retrieve date from an Excel spreadsheet. The error messages are,
ERROR: Failed to connect to Excel to get data from ___.xlsx.
ERROR: Unable to get data values for {variable name}.
ERROR: Failed to make live links to data - aborting simulation.
ERROR: Unable to correctly load in exogenous values - aborting.
The strange thing is that the error occurs only in one model. If I create a different, very simple model and use the same GET XLS DATA call, the model imports the necessary data without any errors. The function call is,
GET XLS DATA( '?{file pointer}' , 'sheet name', 'A' , 'D2' ). (In my case, the file pointer is '?ALI Municipal'.)
Any idea why the model cannot read the data? Calls to the same spreadsheet through GET XLS CONSTANTS work fine. The sheet name in question is the first of three sheets in the file. GET XLS CONSTANTS calls refer to a different sheet in the Excel file.
I am using Vensim version DSS 9.0.0.
Failed to connect to Excel to get data from __.xlsx
-
- Super Administrator
- Posts: 4589
- Joined: Wed Mar 05, 2003 3:10 am
Re: Failed to connect to Excel to get data from __.xlsx
We'd need to see the model/spreadsheet to be able to help. Most likely it's a typo somewhere (it usually is).
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Failed to connect to Excel to get data from __.xlsx
Using the ? operator prevents most filename typos, though I guess the cell reference could be wrong.
Another possibility is that you're using the DIRECT protocol for GET XLS (see Tools>Options>Settings) and the file is locked because it's open in Excel.
Another possibility is that you're using the DIRECT protocol for GET XLS (see Tools>Options>Settings) and the file is locked because it's open in Excel.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Failed to connect to Excel to get data from __.xlsx
There were some typos in the '?{filename}' settings, but I have corrected those. One previous error type was a space between the ? and the filename, but those errors are now corrected. There were also quite a few ? aliases, since different people have worked on the model over the past few years. Now there are only a few of those aliases.
I checked the DIRECT protocol. It's set for OLE.
I checked the DIRECT protocol. It's set for OLE.
Re: Failed to connect to Excel to get data from __.xlsx
Did these changes fix the problem, or is it still failing to read some links? I think we'd need a copy of the model for further diagnosis.
Switching to DIRECT mode is more reliable, but you can't have the spreadsheet open when the model runs (Excel is hostile about file locking).
Switching to DIRECT mode is more reliable, but you can't have the spreadsheet open when the model runs (Excel is hostile about file locking).
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Failed to connect to Excel to get data from __.xlsx
Unfortunately, the problem persists. Can you please tell me where to send the model? We'd be happy for you to take a look. We will send both the Vensim model and the Excel spreadsheet.
Re: Failed to connect to Excel to get data from __.xlsx
Vensim at vensim.com.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/