Convert HTML Table To CSV – table2csv

Category: Javascript , Table | October 9, 2020
Author:YunisDEV
Views Total:1,707 views
Official Page:Go to website
Last Update:October 9, 2020
License:MIT

Preview:

Convert HTML Table To CSV – table2csv

Description:

table2csv is a vanilla JavaScript Table To CSV converter that reads and saves tabular data as a CSV file for further use.

See Also:

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>

You Might Be Interested In:


Leave a Reply