Cancel
Showing results for 
Search instead for 
Did you mean: 

Auto-open an excel file filled with endsim after the simulation

Builder
Builder

Hi all,

 

at the endsim of my simulation i fill some excel files with results in tables of my model (writeexcelFile).

I'd like to know if there is a command or an easy way, to auto open the excel file filled of results at the end of the simulation ?

 

thanks in advance !!!!

4 REPLIES

Re: Auto-open an excel file filled with endsim after the simulation

Phenom
Phenom

try this

 

startextProc("C:\Program Files (x86)\Microsoft Office\Office14\excel.exe c:\temp\xxx.xls");

 

where path to excel.exe and excel-file  have to be adapted acc. to your needs

Re: Auto-open an excel file filled with endsim after the simulation

Builder
Builder

I don't know why, but my excel.exe file is : C:\Program Files (x86)\Microsoft Office\Office12\excel.exe

 

 

I have a problem because my path contains space " ". So it is interpreted as a different path... and try to open segments as different path.

 

Should I replace spaces with something like %20 or else ?

Re: Auto-open an excel file filled with endsim after the simulation

Phenom
Phenom

@office12 office14

 

different excel versions different paths

 

add quotes (\") to the excel file (path)

 

startextProc("C:\Program Files (x86)\Microsoft Office\Office14\excel.exe \"C:\Temp\xxx yyy zzz\xxx.xls\"");

Re: Auto-open an excel file filled with endsim after the simulation

Builder
Builder

It works !

 

 

Thanks a lot ! Smiley Happy