We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
js-xlsx提供一些api可以在浏览器中使用,所以技术上是否可行?感觉只有解压的部分用浏览器api替换掉nodejs的api就可以了,后续解析模板的代码是否用到了nodejs呢?
The text was updated successfully, but these errors were encountered:
最早我自己的运行环境肯定是nodejs, 所以只考虑了nodejs的运行环境 可以考虑一下开个新项目, 做到同时兼容浏览器
Sorry, something went wrong.
因为后台可能是java或php,所以更希望前端就能搞定模板渲染,后台只负责提供数据
我目前在VUE中使用了ejsExcel,另,方便的话看下 #70 先安装包'jszip-utils'和'file-saver',然后导入
import JSZipUtils from 'jszip-utils' import { saveAs } from 'file-saver'
//生成Excel文件 const that = this const ejsexcel = require("ejsexcel"); (async function() { //不写这一行导出会出错 if(window.setImmediate === undefined)window.setImmediate = f=>setTimeout(f,0) const exlBuf = await JSZipUtils.getBinaryContent('Template/' + that.xlsxName + '.xlsx') const exlBuf2 = await ejsexcel.renderExcel(Buffer.from(exlBuf), xlsData); saveAs(new Blob([exlBuf2]) , that.xlsxName + '.xlsx') })();
No branches or pull requests
js-xlsx提供一些api可以在浏览器中使用,所以技术上是否可行?感觉只有解压的部分用浏览器api替换掉nodejs的api就可以了,后续解析模板的代码是否用到了nodejs呢?
The text was updated successfully, but these errors were encountered: