02-15-2010 05:05 AM
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 ?
Solved! Go to Solution.
02-15-2010 05:14 AM
Hi
You have to add additional quotation marks.
Call ExtProgram("excel.exe","""G:\A Folder Name\File Name.xls""")
Hope this helps.
Winfried
02-15-2010 06:49 AM
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 ?
02-15-2010 07:06 AM
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
02-15-2010 07:50 AM
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
02-15-2010 08:43 AM