Keeping Excel quiet when importing values into Vensim

Use this forum to post Vensim related questions.
Post Reply
TomBerman
Junior Member
Posts: 2
Joined: Tue Jun 22, 2010 10:51 am

Keeping Excel quiet when importing values into Vensim

Post by TomBerman »

Hi,

I apologise in advance if this has been answered already.

I am using Excel to import values into a Vensim model. When I simulate the model, Excel 'pops up' and needs to be manually minimised. I was hoping there is a way of making Excel 'be quiet' when I run the simulation?

(By this I mean ideally not appearing at all)

Any help would be much appreciated.

Kind regards.

Tom
tomfid
Administrator
Posts: 3816
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

I assume you're using the GET XLS functions? In that case Excel does need to launch.

As an alternative, you can put constants and data in input files, so no Excel is needed.

For constants, see ".csv files using to input changes" and "Constant Input Files" in the online help index.

For data, see "Tab Delimited and Spreadsheet Data"

You can also write some VB/macro language in the spreadsheet to give a naive user controls for exporting data to easily-readable text files, if needed.

Tom
TomBerman
Junior Member
Posts: 2
Joined: Tue Jun 22, 2010 10:51 am

Post by TomBerman »

Hi Tom,

Thank you for your quick and useful response.

To add some clarification :

I am indeed using the GET XLS function

I am developing an application in Java that read data from the model. The model is not mine, and it is sufficiently complex that I would not want to change much in the model for fear of breaking it.

My hope was that there was a fairly simple way, either in the Vensim settings or from the Java software to tell Excel not to be so obtrusive.

Thanks in advance.

T
tomfid
Administrator
Posts: 3816
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

One more thought: maybe there's a way on the Excel side to make the workbook less obtrusive. One common issue, for example, is Excel's frequent request to recalculate spreadsheets that are saved in older versions; updating might help. It also might be possible to write a VB script that would minimize the workbook on opening (though in general that kind of thing seems like a security hazard, so it may not be possible). Also, there might be a system command to minimize another process? This is just wild speculation - hope there's a kernel of truth in it.

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

Post by bob@vensim.com »

This is something that will be an option in the next release of Vensim so that files will be read directly without starting Excel at all.
Leila
Junior Member
Posts: 3
Joined: Fri Jan 11, 2013 1:09 pm
Vensim version: PLE

Re: Keeping Excel quiet when importing values into Vensim

Post by Leila »

Dears,
I am challenging the same issue, if somebody resolve this problem via developing a code or any other means, would you please put the sample for me.

Really thanks,
Leila,
tomfid
Administrator
Posts: 3816
Joined: Wed May 24, 2006 4:54 am

Re: Keeping Excel quiet when importing values into Vensim

Post by tomfid »

This thread is a bit old ... it's now extremely easy to do this by using the GET DIRECT functions instead of GET XLS. Excel is unfriendly about file locking, so you may encounter the opposite restriction - files cannot be open in Excel during access by Vensim (though read-only mode might work). Normally this is not a problem.
Leila
Junior Member
Posts: 3
Joined: Fri Jan 11, 2013 1:09 pm
Vensim version: PLE

Re: Keeping Excel quiet when importing values into Vensim

Post by Leila »

Thanks, I tried your advice, but the PLE version I am using can not accept the Get Direct function?! What's the problem?

Regards,
Administrator
Super Administrator
Posts: 4613
Joined: Wed Mar 05, 2003 3:10 am

Re: Keeping Excel quiet when importing values into Vensim

Post by Administrator »

PLE cannot read from Excel. The only solution would be to invest in PLE+, Pro or DSS.

Tony.
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
Leila
Junior Member
Posts: 3
Joined: Fri Jan 11, 2013 1:09 pm
Vensim version: PLE

Re: Keeping Excel quiet when importing values into Vensim

Post by Leila »

Thanks Tony,
tomfid
Administrator
Posts: 3816
Joined: Wed May 24, 2006 4:54 am

Re: Keeping Excel quiet when importing values into Vensim

Post by tomfid »

If you're running the model, not modifying it, you can use the Model Reader as well. The creator would have to change the GET XLS to GET DIRECT and publish as a vpm for you.
Post Reply