Changing which excel file data is called from

Use this forum to post Vensim related questions.
Post Reply
bwils
Newbie
Posts: 1
Joined: Thu Jun 08, 2006 2:06 am

Changing which excel file data is called from

Post by bwils »

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)?:)
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

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.
LAUJJL
Senior Member
Posts: 1477
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

changing wich excel file is called

Post by LAUJJL »

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
Attachments

[The extension bat has been deactivated and can no longer be displayed.]

bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

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.
Post Reply