Exporting data to Excel during model run

Use this forum to post Vensim related questions.
Post Reply
OmoOleghe
Junior Member
Posts: 4
Joined: Wed Nov 29, 2017 2:43 pm
Vensim version: PLE+

Exporting data to Excel during model run

Post by OmoOleghe »

Hi, I am using VensimPLEPlus. How can I export data to Excel during model run?
Administrator
Super Administrator
Posts: 4589
Joined: Wed Mar 05, 2003 3:10 am

Re: Exporting data to Excel during model run

Post by Administrator »

No, you would need Vensim DSS for that.
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
OmoOleghe
Junior Member
Posts: 4
Joined: Wed Nov 29, 2017 2:43 pm
Vensim version: PLE+

Re: Exporting data to Excel during model run

Post by OmoOleghe »

Thanks admin, I have access to Vensim DSS as well. How can I export data to Excel as the model is being run? I have searched the Help menu and did not see any link showing this.
Administrator
Super Administrator
Posts: 4589
Joined: Wed Mar 05, 2003 3:10 am

Re: Exporting data to Excel during model run

Post by Administrator »

There are three options.

1. In Vensim, click File->Edit File. Create a file called "AfterSim.cmd", and in it, paste the following
MENU>VDF2CSV|!|!
Close this file. Back with the model, click Model->Simulate, and click the Pre/Post tab. There is a button titled "Post processing", click this and select the "AfterSim.cmd" file.
Now when you run the simulation, the current dataset will be exported to a CSV file (which Excel can read). You can also use MENU>VDF2XLS|!|! if you want an Excel format file.

2. The 2nd option requires programming an external function, let me know if you want to do this as it's a lot more involved than using option 1.

3. We have an external function library that can export to Excel during the simulation. Again, it's more involved than using option 1, so let me know if you want to look into this.
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
OmoOleghe
Junior Member
Posts: 4
Joined: Wed Nov 29, 2017 2:43 pm
Vensim version: PLE+

Re: Exporting data to Excel during model run

Post by OmoOleghe »

hi, admin, i tried option 1. I am using a Mac. When I click on File>Edit File, there is a list of files to edit, no option to create a .cmd file. How do I create the "AfterSim.cmd" file?
Administrator
Super Administrator
Posts: 4589
Joined: Wed Mar 05, 2003 3:10 am

Re: Exporting data to Excel during model run

Post by Administrator »

Ahh, on a Mac. You'll need to use a text editor to create the file (there is no way to create the blank file from within Vensim (this is a Mac limitation, not Vensim)).

The other options I listed for linking to Excel are also not available on the Mac.
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
OmoOleghe
Junior Member
Posts: 4
Joined: Wed Nov 29, 2017 2:43 pm
Vensim version: PLE+

Re: Exporting data to Excel during model run

Post by OmoOleghe »

Hello admin,
Can you explain more on how to use a text editor to create the file as I am using a Mac. Or are you saying that with a Mac it is not possible.
Administrator
Super Administrator
Posts: 4589
Joined: Wed Mar 05, 2003 3:10 am

Re: Exporting data to Excel during model run

Post by Administrator »

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