
table2csv is a vanilla JavaScript Table To CSV converter that reads and saves tabular data as a CSV file for further use.
See Also:
- Lightweight CSV To Table Converter – CsvToTable.js
- Export Tabular Data To Excel – table2excel.js
- JS Array To CSV Exporter And CSV To Table Converter – CSVx.js
How to use it:
1. Insert the table2csv.min.js file into the HTML page.
<script src="table2csv.min.js"></script>
2. Assign a unique ID to your HTML table.
<table id="example"> ... </table>
3. Create a converter button and determine the selector of the target HTML table using the data-table attribute:
<button onclick="table2csv(this,1)"
data-table="example">
Download The Table
</button>






