通过打开本地空白文件的方式从而打开Office办公软件
const shell = require('electron').shell; const path = require('path'); shell.openItem(path.join(__dirname, 'new.docx'));
备注:这种方式只是用来测试打开本地Office文件,如果应用正式打包之后,需通过注册表方式进行打开指定Office软件。