Exporting data to Excel during model run
Exporting data to Excel during model run
Hi, I am using VensimPLEPlus. How can I export data to Excel during model run?
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Exporting data to Excel during model run
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Exporting data to Excel during model run
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.
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Exporting data to Excel during model run
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.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Exporting data to Excel during model run
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?
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Exporting data to Excel during model run
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.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Exporting data to Excel during model run
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.
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.
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Exporting data to Excel during model run
Google is the best place,
https://www.google.co.uk/search?q=creat ... tgfar5ewDw
https://www.google.co.uk/search?q=creat ... tgfar5ewDw
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