Skip to content
New issue

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

请问下如何导出多维数组到EXCEL啊? #528

Closed
electroapache opened this issue Mar 22, 2018 · 7 comments
Closed

请问下如何导出多维数组到EXCEL啊? #528

electroapache opened this issue Mar 22, 2018 · 7 comments
Labels

Comments

@electroapache
Copy link

tim 20180322162354
请问下如何实现类型的效果啊?弄了几天都没写出来

@electroapache electroapache changed the title 请问下如何导出多维数组啊? 请问下如何导出多维数组到EXCEL啊? Mar 22, 2018
@PanJiaChen
Copy link
Owner

这不就是element-ui 的多级表头么。
http://element-cn.eleme.io/#/zh-CN/component/table#duo-ji-biao-tou

@electroapache
Copy link
Author

不是啊,我想将这种导出到EXCEL,但是好像只能导二维数组

@PanJiaChen
Copy link
Owner

PanJiaChen commented Mar 22, 2018

这样看xlsx, 略复杂。我之后添加一下这种形式的demo。

@zeroLynn123
Copy link

请问,有导出多维的Excel表格的形式吗

@zeroLynn123
Copy link

export_json_to_excel这种方法能设置多维的表头的吗?怎么设置?谢谢

@L0nge
Copy link

L0nge commented Oct 29, 2018

定义一个合并规则类似于这样merges = [{s: {r:0,c:0}, e: {r:0,c:1}},{s: {r:0,c:2}, e: {r:0,c:4}}] 这个意思就是单元格0,0和单元格0,1合并,单元格0,2和单元格0,4合并。
export_json_to_excel方法里添加/* add merges */ for (let merge of merges) { if(!ws['!merges']) ws['!merges'] = []; ws['!merges'].push(merge); }

@PanJiaChen
Copy link
Owner

#1718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants