数据表导出到 Excel 按钮未显示 [英] dataTables Export to Excel button is not showing

查看:32
本文介绍了数据表导出到 Excel 按钮未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 jquery 数据表中遇到了问题.iPad 和移动设备中未显示导出到 Excel".它显示在桌面上.其他按钮,如复制、csv 和 pdf 显示在 iPad 和桌面上.这是我的代码:

I have a problem in jquery dataTables. The "Export to Excel" is not showing in iPad and mobile devices. It is showing in desktop. Other buttons like copy, csv and pdf are showing in iPad and desktop. Here is my code :

$('#productDatatable').DataTable({
    dom: 'Bfrtip',
    buttons: [
        'copy', 'excel', 'pdf', 'csv'
    ]
} );

推荐答案

如果有人在显示 DataTable 导出按钮时仍有问题,请尝试按以下顺序加载所需的 JS 库.

Try loading required JS libraries in the following order, if anyone still having issues in showing the DataTable export buttons.

<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script> 
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>

干杯!

这篇关于数据表导出到 Excel 按钮未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆