Executing an excel file from cspro

Other discussions about CSPro
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Executing an excel file from cspro

Post by AriSilva »

I wanted to start an excel file from inside a cspro application.
I´ve tried to use the execsystem but it does not execute the file, as in
execsystem("ELSI_51_Controle_Coleta.xlsm");
If I put the whole path for the excel application in my machine it calls the excel, but this is not good enough, since I´m sending the application elsewhere, where I do not know the excel full path.
Best
Ari
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Executing an excel file from cspro

Post by josh »

Try the following:

execsystem("explorer.exe ELSI_51_Controle_Coleta.xlsm");

In the upcoming version 7.3 it will be even simpler. You will be able to do:

view("ELSI_51_Controle_Coleta.xlsm");
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: Executing an excel file from cspro

Post by AriSilva »

It worked!!
Thanks very much indeed.
Best
Ari
Post Reply