Is it possible to get an example incorporating more of the options for the buttons please?

Is it possible to get an example incorporating more of the options for the buttons please?

ChrisOBChrisOB Posts: 1Questions: 1Answers: 0

Hello, I am new to DataTables, but slowly getting the pages to respond how I want them.

For example, a excelHtml5 button that formats the filename and extension, or PDFHtml5 with the orientation and sizing options. Many of the examples I am finding on your site are for flashbuttons or only have a limited example.

Answers

  • Tom (DataTables)Tom (DataTables) Posts: 139Questions: 0Answers: 26
    edited June 2016

    All you need to do is define multiple parameters in the same object, for example.

                {
                    extend: 'excelHtml5',
                    filename: 'Data export',
                    extension: '.xlsx'
                },
    

    Thanks

    Tom

  • mmalmeidammalmeida Posts: 15Questions: 2Answers: 0

    Note that as per https://datatables.net/extensions/buttons/examples/initialisation/export.html:
    Buttons provides button types that will automatically determine if HTML5 or Flash should be used based on the browser's functionality and it is strongly recommended that you use these button types over the specific HTML5 or Flash button types. These are: copy, csv, excel, pdf.

This discussion has been closed.