Changing which excel file data is called from
Changing which excel file data is called from
Hi, I've developed an education model that is to be applied to multiple countries and distributed via the VensimReader. The model imports data from excel sheets. To change which country is simulated, I change the name of the excel file in the GET XLS functions. We would like to distribute the model to users who will be using the VensimReader. Is there a way for a Reader user to change which excel sheet is used for the imported data (each excel sheet would formatted identically but with data from a different country)?:)
-
- Super Administrator
- Posts: 4838
- Joined: Wed Mar 05, 2003 3:10 am
Hi and welcome to the forum.
I've had a quick look and cannot see a way of doing it (you usually do it in the model settings dialog, but that is not available in model reader).
You could do it with some worksheet manipulation in Excel, but if one user will only look at data from one country, then it is easier to just rename the spreadsheet.
All the best,
Tony.
I've had a quick look and cannot see a way of doing it (you usually do it in the model settings dialog, but that is not available in model reader).
You could do it with some worksheet manipulation in Excel, but if one user will only look at data from one country, then it is easier to just rename the spreadsheet.
All the best,
Tony.
changing wich excel file is called
Hi
Here is joined a batch file .bat extension that can be called from the exploitation system and that copies automatically the file.xls that you want to extract data to the standard file that is mentionned in your get xls command in Vensim.
you do not need to know the command language, you just
multiply the number of countries by adding more numbers and more lines.
Then just before launching the Vesnim reader, you must get the user to run the example.bat file and then run the reader.
Regards.
JJ
Here is joined a batch file .bat extension that can be called from the exploitation system and that copies automatically the file.xls that you want to extract data to the standard file that is mentionned in your get xls command in Vensim.
you do not need to know the command language, you just
multiply the number of countries by adding more numbers and more lines.
Then just before launching the Vesnim reader, you must get the user to run the example.bat file and then run the reader.
Regards.
JJ
- Attachments
-
[The extension bat has been deactivated and can no longer be displayed.]
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
The xls wildcards is an interesting issue. If you are only calling GET XLS DATA you can set everything up using '?Query String' for the file names, then before you save to others to use go to Models>Settings>XLS Files and remove then map.
Then when the user tries to simulate they will be queried for a name - though to change the file they will need to close and reopen the model.
Unfortunately, if you are using GET XLS CONSTANTS or GET XLS LOOKUPS this won't work. I will look into making the file mapping available in the Reader.
Then when the user tries to simulate they will be queried for a name - though to change the file they will need to close and reopen the model.
Unfortunately, if you are using GET XLS CONSTANTS or GET XLS LOOKUPS this won't work. I will look into making the file mapping available in the Reader.