Executing an excel file from cspro

Other discussions about CSPro
AriSilva
Posts: 229
Joined: July 22nd, 2016, 3:55 pm

Executing an excel file from cspro

Postby AriSilva » July 7th, 2019, 12:31 pm

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: 1871
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Executing an excel file from cspro

Postby josh » July 7th, 2019, 7:41 pm

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: 229
Joined: July 22nd, 2016, 3:55 pm

Re: Executing an excel file from cspro

Postby AriSilva » July 8th, 2019, 9:55 am

It worked!!
Thanks very much indeed.
Best
Ari


Return to “Other”