通过打开本地空白文件的方式从而打开Office办公软件
const shell = require('electron').shell; const path = require('path'); shell.openItem(path.join(__dirname, 'new.docx'));
备注:这种方式只是用来测试打开本地Office文件,如果应用正式打包之后,需通过注册表方式进行打开指定Office软件。
通过打开本地空白文件的方式从而打开Office办公软件
const shell = require('electron').shell; const path = require('path'); shell.openItem(path.join(__dirname, 'new.docx'));
备注:这种方式只是用来测试打开本地Office文件,如果应用正式打包之后,需通过注册表方式进行打开指定Office软件。
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。