• Resolved adsmar87

    (@adsmar87)


    Hi, I added some custom commands to export certain columns of my PDF, however I now want to add a CSV button. I’ve added it to my shortcode but the button isn’t showing.

    [table id=10 datatables_buttons="pdf,csv" datatables_columnfilterwidgets=true datatables_columnfilterwidgets_exclude_columns=2,3,4 /]

    How do I include this? Here are my current custom commands, I’ve tried adding it next to PDF with a comma but this didn’t work.

    "dom": "BWlfrtip", "buttons":[ { "extend": "pdf", "footer": true, "exportOptions": { "columns": "0,1,2,3" } } ]

    Any help is much appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    As you are using a “Custom Command” to influence the PDF, you’ll also have to extend that:

    "dom": "BWlfrtip", "buttons":[ { "extend": "pdf", "footer": true, "exportOptions": { "columns": "0,1,2,3" } }, "csv" ]
    

    Regards,
    Tobias

    Thread Starter adsmar87

    (@adsmar87)

    Perfect. Thanks for the help!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias
     
    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding CSV button in custom commands’ is closed to new replies.