Excel Button not showing but other buttons are.

Excel Button not showing but other buttons are.

lincstar182lincstar182 Posts: 6Questions: 4Answers: 0

Not sure why this time using your awesome tool would be any different than before. But the excel button is just not there. I can see (and use) the Copy, PDF, and Print buttons though.

$('#customers').DataTable({
dom: 'lfrBtip',
buttons: ['copy', 'excel', { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'letter' }, 'print']
});

Ideas?
Thank you.

Answers

  • allanallan Posts: 63,208Questions: 1Answers: 10,415 Site admin

    Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.

    Information on how to create a test page, if you can't provide a link to your own page can be found here.

    Thanks,
    Allan

  • lincstar182lincstar182 Posts: 6Questions: 4Answers: 0

    Due to using MVC and being behind corporate firewalls, it will be too much work to provide a test case. I'll just create my own Excel export buttons.
    You are very busy, I'm sure.
    Thanks

  • allanallan Posts: 63,208Questions: 1Answers: 10,415 Site admin

    I'd be happy to take a look. This example shows the Excel button which appears okay for me - does it for you?

    If the button isn't showing for you I'd guess that perhaps the JSZip dependency isn't being loaded - but I can't say for sure.

    Allan

  • yishayhyishayh Posts: 108Questions: 17Answers: 0
    edited April 2016

    Hi,

    we are having the same problem.
    Sorry, We can't showcase it either.
    This is the code we use to add the button (it doesn't show neither with other buttons nor on its own).

    We use it in an angular framework with the following other datatable plugins:

    extensions/dataTables.buttons/dataTables.buttons.min.js
    extensions/dataTables.select/dataTables.select.min.js
    extensions/ColReorder-1.2.0/js/dataTables.colReorder.js
    extensions/RowReorder-1.1.0/js/dataTables.rowReorder.js
    extensions/FixedColumns-3.2.1/js/dataTables.fixedColumns.min.js
    extensions/dataTables.select/dataTables.select.min.js
    plugins/bootstrap/dataTables.bootstrap.js
    extensions/Editor-1.5.3/js/dataTables.editor.js
    extensions/Editor-1.5.3/js/editor.bootstrap.min.js
    plugins/table.sum/sum.js
    

    This is the code adding the button:

    $scope.getTableButtons = function (editorObject) {
                     return [{
                             extend: 'excel',
                             text: 'Save current page',
                             exportOptions: {
                                     modifier: {
                                             page: 'current'
                                     }
                             }
                     }];
             };
    

    We get no exceptions indicating we done something wrong, it just doesn't appear in the

    Thanks,
    Yishay

  • allanallan Posts: 63,208Questions: 1Answers: 10,415 Site admin

    I don't see the buttons.html5.js or buttons.flash.js file being included in your list of files? You also need to include JSZip if you are using the HTML5 export button type.

    Allan

  • yishayhyishayh Posts: 108Questions: 17Answers: 0

    Hi Allan,

    Many thanks, I will try it tomorrow and update you.

    Have a nice day,
    Yishay

This discussion has been closed.