From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI LabVIEW,CVI,数据采集等产品讨论区

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview那个函数可以直接通过文件对话框,打开电脑中文件?

Solved!
Go to solution

Labview有那个函数可以直接通过文件对话框,打开电脑中文件,如我想直接这样打开.xls文件

0 Kudos
Message 1 of 4
(3,860 Views)
Solution
Accepted by topic author anyzhang

调用“执行系统命令”函数()System Exec.vi,输入端写入cmd命令即可

 

 

cmd Excel.PNG

 

或者使用LabVIEW的ActiveX范例也可以实现。

0 Kudos
Message 2 of 4
(3,844 Views)

非常感谢!我去试一下!

0 Kudos
Message 3 of 4
(3,840 Views)
Solution
Accepted by topic author anyzhang

cmd /c 好像只能打开  *.txt   *.ini文件,Excel文件好像打不开.另外工作目录输入路径,命令行输入文件名也是找不到.

您的那个范例里面字符串输入:cmd /c Users/zwang/Desktop/test.xlsx这个的意思分别怎样理解: 

cmd /c 调用串口命令后终止   Users是指此电脑的用户名吗?  Desktop/test.xlsx此文件在桌面上?

0 Kudos
Message 4 of 4
(3,832 Views)