How I can build a custom button to use sheeljs to export in excel version 97-2004 xls file?

How I can build a custom button to use sheeljs to export in excel version 97-2004 xls file?

jmleitaojmleitao Posts: 6Questions: 2Answers: 0
edited July 2020 in Free community support

I try to do this but doesn't work.

buttons:[
{
extend :'pageLength',
},
{
text: 'Exportar',
action: function ( e, dt, node, config ) {
//var elt = document.getElementById('DadosTab');
var wb = XLSX.utils.table_to_book(dt, {sheet:"Sheet JS"});
return dl ?
XLSX.write(wb, {bookType:type, bookSST:true, type: 'base64'}) :
XLSX.writeFile(wb, fn || ('test.' + (type || 'xlsx')));
}
}
],

Answers

This discussion has been closed.