jquery->tabletools->excel导出将标题向右移动
我们面临的一个严重问题是,如果表格显示没有滚动条,则表格的 Excel 导出(jquery->datatables->tabletools)工作正常。如果需要水平滚动条,则表的标题将被转换,并且一些“\t”标记将被添加到标题的innerHTML 前面并附加到标题的innerHTML 中。因此,对于每个“\t”1 列,Excel 导出会将 Excel 文件中的标题向右移动。您知道如何摆脱它并解决问题吗?
将不胜感激,谢谢!
a serious problem we are facing is that the excel export of tables (jquery->datatables->tabletools) works fine if the tables are displayed without a scroll bar. If a horizontal scroll bar is needed the headers of the tables are transformed and some "\t" tokens are prepended and appended to the header's innerHTML. Thus the excel export shifts the headers in the excel file to the right, for each "\t" 1 column. Do you have an idea how to get rid of that and solve the problem?
Would be highly appreciated, thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们发现“\t”标记是由 PHP 循环以可疑的方式在模板中创建表头引起的。所以没有 JS 错误,与 jquery 无关。
We found that the "\t" tokens were caused by the PHP loop creating the table headers in the template in a dubious way. So no JS error and nothing to do with jquery.