Export excel
Export excel
hello guys, I have error with java script my error is this:
buttons.html5.min.js:13 Uncaught (in promise) TypeError: (a.URL || a.webkitURL || a).createObjectURL is not a function
at new k (buttons.html5.min.js:13)
at buttons.html5.min.js:15
at buttons.html5.min.js:31
I want to export my table to excel . my program dont export my excel file. it appears load simbol
it is my code in Java script:
function tablaliqpen() {
$.ajax({
type: "POST",
url: "php/accion/post.php",
data: {op: 'tablaliqpen'},
dataType: "json",
cache: false,
success: function (a) {
$('#tablaliqpen').DataTable({
dom: 'Bfrtip',
buttons: ['excel'],
destroy: true,
responsive: true,
language: {
"url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/Spanish.json"
},
columns: [
{title: 'colum1'},
{title: 'colum2'},
{title: 'colum3'},
{title: 'colum4'}
],
data: a['data']
});
},
error: function (xhr, ajaxOptions, throwError) {
console.log(xhr); console.log(ajaxOptions); console.log(throwError);
}
});
return false;
}
i dont undestand the error and i dont know some solutions for resolve this problem.
Tranks
This question has an accepted answers - jump to answer
Answers
Can you give me a link to the page showing the issue please? I'm not sure what would cause that specific error. What browser and version are you using?
Thanks,
Allan
yes, my links are
https://datatables.net/extensions/buttons/examples/html5/simple.html
https://datatables.net/extensions/buttons/examples/html5/filename.html
https://codepen.io/GiSmo/pen/pbjzXw
i am usinng this version
js
https://code.jquery.com/jquery-3.3.1.js
https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js
https://cdn.datatables.net/buttons/1.5.2/js/dataTables.buttons.min.js
https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js
https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js
https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js
https://cdn.datatables.net/buttons/1.5.2/js/buttons.html5.min.js
css
https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css
https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css
The error is occurring for you on that page?
What browser and version are you using?
Thanks,
Allan