mobius1 / exportable Goto Github PK
View Code? Open in Web Editor NEWA Vanilla-DataTables extension to allow for exporting table data to various formats.
License: MIT License
A Vanilla-DataTables extension to allow for exporting table data to various formats.
License: MIT License
I am getting the error Uncaught TypeError: datatable.exportable.toCSV is not a function
when trying to export a table using the CSV export option. The code that I am using is as below;
<script src="https://unpkg.com/vanilla-datatables@latest/dist/vanilla-dataTables.min.js" type="text/javascript"></script>
<script src="https://unpkg.com/vanilla-datatables-exportable@latest/datatable.exportable.min.js" type="text/javascript"></script>
<script>
var datatable = new DataTable("table", {
exportable: {
type:'csv',
download:true,
escapeHTML: true,
includeHeadings: true
}
});
$(document).on('click', '#csvExport', function(){
datatable.exportable.toCSV();
});
</script>
Cannot read property 'toCSV' of undefined
<button type="button" class="btn btn-sm btn-primary ml-2" onclick="csvExport()">CSV</button>
<script>
var datatable = new simpleDatatables.DataTable("table", {
exportable: {
type:'csv',
download:true,
escapeHTML: true,
includeHeadings: true
}
});
function csvExport() {
datatable.exportable.toCSV();
}
</script>
Please provide some sample code on how to make this work using https://github.com/fiduswriter/Simple-DataTables
Just started using and noticed it was new, have a couple of feature requests;
Is there any way to ensure that all data exported is stripped of HTML tags and just content is exported? href links and styles are being pulled out the table into the CSV and it would be good to stop it.
Can you add a setting to have the first row as the table headings in the table, currently only the table rows are pulled out not the headings.
Great work as always
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.