Datatables buttons 'copyHtml5' error
Datatables buttons 'copyHtml5' error
guilhermew
Posts: 1Questions: 1Answers: 0
Hi guys! Someone can help me with the buttons plugin? I spent some time studding this data tables and now, i need export the table for excel/pdf..
I followed the steps:
* Build a version with plugins.
Insert this code on dataTables inicialization:
$('#' + this.tableId).dataTable({
buttons: [
'excelHtml5',
'csvHtml5',
'pdfHtml5'
],
data: this.lines,
columns: this.headers,
pagingType: 'full_numbers'
});
When i run this code, the error message is shown: datatables.1.10.8.min.js:92485 Uncaught TypeError: Cannot set property 'copyHtml5' of undefined (this line is not from minified file) Someone can help me? I appreciate!
This discussion has been closed.
Answers
Hi,
I don't immediately see any issue with your code there. Can you link to the page showing the issue so I can debug it please.
Allan
I'm having a similar problem. I'm getting 'Unknown button type: copyHtml5'. This is my code:
Failing in dataTables.buttons.js version 1.0.3
Have you included the HTML5 export buttons file?
Allan
I was seeing this error "TypeError: Cannot set property 'copyHtml5' of undefined" when using dataTables 1.10.3. DataTables.ext.buttons appears to be undefined prior to 1.10.5. Upgrading jquery.dataTables (to 1.10.7 in my case) fixed this for me.
This is correct - Buttons requires a relatively modern version of DataTables.
Allan