Export HTML table to CSV using vanilla javascript
Should work on every modern browser and without jQuery or any dependency, here my implementation : // Quick and simple export target #table_id into a csv function download_table_as_csv(table_id, separator=”,”) { // Select rows from table_id var rows = document.querySelectorAll(‘table#’ + table_id + ‘ tr’); // Construct csv var csv = []; for (var i = … Read more