09-20-2012 09:00 AM
If I double click a .csv file in Windows Explorer, then Excel runs and the file is opened.
Is it possible to get LabVIEW to do this?
The problem is, I don't know which version of Excel will be installed, and I also need to accomodate future versions.
Everything I've found with a search seems use to system_exec.vi with a constant pointing to the location (in c:\program files\microsoft office....etc) of a particular version of Excel
So what I want is to have a button which fires an event which takes the specified .csv file and runs whatever version of Excel is installed to open the file.
Solved! Go to Solution.
09-20-2012 09:12 AM
start file.csv will start whatever application is associated with CSV files.
Br, Miha
09-20-2012 09:15 AM
@Miha_Vitorovic wrote:
start file.csv will start whatever application is associated with CSV files.
Br, Miha
Oh, right. You will most probably need to start cmd.exe to do this: something like
cmd.exe /c "start c:\path\file.csv"
09-20-2012 10:39 AM
Oooooooh almost.
It's on the right track, but, as is explained here, there needs to be a further pair of quotes in the command line.
So it actually needs something like cmd.exe /c start "" "c:\path\file.csv"
If the extra quotes aren't there then it opens a command prompt window with the path and filename as the window title (WHY???)
But using START is the correct solution, so I'm going to credit you with that.
Thanks.