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

无法合并单元格 #22

Open
chi-yuer opened this issue Jun 11, 2019 · 9 comments
Open

无法合并单元格 #22

chi-yuer opened this issue Jun 11, 2019 · 9 comments

Comments

@chi-yuer
Copy link

无法合并单元格,“显示部分内容存在问题。是否让我们尽量修复”,控制台没有看到任何问题,但是下载demo页面的没有问题,下载demo页面的js也是无法合并单元格,完全不懂发生了什么

@JackGit
Copy link
Owner

JackGit commented Jun 15, 2019

提供一下可重现页面

@xzs1994
Copy link

xzs1994 commented Jun 17, 2019

@JackGit 我也遇到了这个问题。
1、table需要在thead中设置合并单元格,看了下你给的demo代码中的table只有tbody,想问下,是应为在thead中设置才造成这个问题吗?

js代码:

var exportExcel = new table2Excel('#analysis-table');
                exportExcel.export(filename, 'xlsx');

2、是需要在table2Excel的第二个参数options设置才能合并单元格吗,那么这个参数需要如何设置呢?

@JackGit
Copy link
Owner

JackGit commented Jun 18, 2019

@xzs1994 单元格会自动合并,没有参数设置。请提供最小可重现问题的 table 结构

@xzs1994
Copy link

xzs1994 commented Jun 18, 2019

@JackGit 刚刚测试了下:同一个表格,项目中和本地测试,设置了相同条件进行导出,本地总是可以正确导出但是项目中还是会遇到问题。现在还是不太清楚具体原因。

@JackGit
Copy link
Owner

JackGit commented Jun 19, 2019

@xzs1994 可以检查一下 exceljs 的版本看看

@xzs1994
Copy link

xzs1994 commented Jun 19, 2019

@JackGit 我项目中使用require define加载库,现在的情况是使用table2excel,core.js和exceljs,此时会重复加载未知文件ExcelJs,这似乎是本项目中设置的,想问下有什么好的解决方法吗(因为这个原因,我使用的是table2excel.min.js文件)

@xzs1994
Copy link

xzs1994 commented Jun 19, 2019

错误提示1:
错误提示1

错误提示2:
错误提示2

@JackGit
Copy link
Owner

JackGit commented Jun 20, 2019

@xzs1994 使用最新 exceljs 试试。我遇到过这样的问题

@xzs1994
Copy link

xzs1994 commented Jun 20, 2019

@JackGit 好的,我试试,有结果我再反馈。

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

No branches or pull requests

3 participants