DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Call ExtProgram

Solved!
Go to solution
I'm running Diadem version 11.1 and trying to use the Call ExtProgram command. A call to

Call ExtProgram("excel.exe","G:\A Folder Name\File Name.xls") invokes excel OK but then attempts to open A.xls then Folder .xls and Name.xls.

 

I've tried using double qoutes around the path i.e Call ExtProgram("excel.exe",""G:\A Folder Name\File Name.xls"") but this is not recognised as an allowable command by Diadem.

 

G: is a networked shared drive.

 

Any ideas ?

 

 

0 Kudos
Message 1 of 6
(4,111 Views)

Hi

 

You have to add additional quotation marks.

Call ExtProgram("excel.exe","""G:\A Folder Name\File Name.xls""")

 

Hope this helps.

 

Winfried

0 Kudos
Message 2 of 6
(4,110 Views)

Tried that but no joy. Diadem returns Error in Scripname.vbs line 7 column 31 expected ')'

 

Attempted to access a file from my  C: drive but same problem occurs so not a networked drive issue.

 

If I change the pathname and delete the spaces it works, but that is not an option for me to fix the problem.

 

Is there another way of calling up excel and opening a file from within a script ?

0 Kudos
Message 3 of 6
(4,101 Views)
Solution
Accepted by topic author Mikey-H

May bee you missed some " signs. Put the Excel.exe between the " sign. The filename must be enclose in three " signs =>""". So one " sign will be passed to Windows. And do not forget the closing columns.

I tried it at my computer and it works.

 

Please try again...

 

Winfried

0 Kudos
Message 4 of 6
(4,098 Views)

Hi Mikey-H,

 

I don't have a G: drive, but this worked for me on my C: drive when I created that path out of an existing *.XLS file.  Note that if you want to take the default application for the file extension, you can just pass the file path by itself-- which is usually a very safe bet for *.XLS files.  Winner is quite right that you  must have exactly 3 double-quote (") characters fore and aft in order for Windows to navigate the file path with spaces in it.

 

Call ExtProgram("""C:\A Folder Name\File Name.xls""")

Brad Turpin

DIadem Product Support Engineer

National Instruments

0 Kudos
Message 5 of 6
(4,092 Views)
Yeah  was only using 2 double qoutes not 3  - working now thanks all
0 Kudos
Message 6 of 6
(4,089 Views)