Export to Excel not working when deployed

前端 未结 1 1997
[愿得一人]
[愿得一人] 2021-01-25 07:14

This is the code I used to create a data table with export functionality.

oTable = $(\"#tblSearch\").DataTable({
    \"jQueryUI\": true,
    \"sPaginationType\"         


        
相关标签:
1条回答
  • 2021-01-25 07:25

    Change the sSwfPath to an absolute path.

    "tableTools": {
        "sSwfPath": "http://cdn.datatables.net/tabletools/2.2.3/swf/copy_csv_xls_pdf.swf",
        "aButtons": ["xls"]
    }
    

    here using the dataTables CDN. The problem is, that the relative path messes up when you deploy to your IIS or whatever windows platform you are using. This is a very common problem.

    0 讨论(0)
提交回复
热议问题