Electron 调用系统Office软件

通过打开本地空白文件的方式从而打开Office办公软件

const shell = require('electron').shell;
const path = require('path');
shell.openItem(path.join(__dirname, 'new.docx'));

 备注:这种方式只是用来测试打开本地Office文件,如果应用正式打包之后,需通过注册表方式进行打开指定Office软件。

posted @ 2017-05-15 17:55  yshy  阅读(4842)  评论(1编辑  收藏  举报