导出Excel报未安装excel
[code]if (!jatoolsPrinter.isExcelInstalled(testPrint)) {alert('你的系统没有安装excel,不能导出!', 1);
return;
} else
jatoolsPrinter.exportAsExcel(document.getElementById('tablist')); // 打印预览[/code]
电脑已安装office,但一直提示未安装excel,在demo导出excel正常,是什么问题?:Q:Q 请先引入 print.jatools.com/jatoolsPrinter.js用异步方式调用 isPrintableFileType:
[code]function doPrint(how) { var jatoolsPrinter = getJatoolsPrinter();
jatoolsPrinter.isPrintableFileType('xls', function(res) {
if (res) {
jatoolsPrinter.printDocument('a.xls', {
printer : "pdfFactory",
copies : 3,
duplex : true,
portrait : false,
collate : true
});
} else
alert('请安装MS Office');
});
}[/code]
参照在线示例:[url]http://print.jatools.com/docprint.htm[/url]
页:
[1]