datatable tools copy, pdf. csv, excel export didnt work. only print is working

前端 未结 1 1842
夕颜
夕颜 2021-01-29 08:30

im using datatables for my front end requirements and it works good except im having an issue in exporting stuff e.g. copy, csv, excel and pdf, only print is working. Any ideas,

相关标签:
1条回答
  • 2021-01-29 09:00

    See sSwfPath option documentation, below is an excerpt:

    sSwfPath Define the path of the SWF to be used by TableTools for copy to clipboard and saving a file locally operations. If you are having problems with these operations, but not printing, this is very likely to be the issue.

    Most likely the problem is because of the incorrect path to the copy_csv_xls_pdf.swf file. Try to use CDN link instead:

    //cdn.datatables.net/tabletools/2.2.4/swf/copy_csv_xls_pdf.swf
    

    Quoting Allan Jardine, developer of DataTables:

    Also, it won't work from a local drive, unless you have a security exception set up for Flash. You can change the Global Security Settings here: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html.

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