1.0.1 • Published 5 years ago
yunisdev-table2csv v1.0.1
Installation
Add following HTML before body end:
<script src="https://yunisdev.github.io/table2csv/table2csv.min.js"></script>
<!-- or -->
<script src="https://unpkg.com/yunisdev-table2csv"></script>or you can install using npm:
npm i yunisdev-table2csvUsage
You can use this library using following syntax:
<button class="table-btn" onclick="table2csv(this,1)" data-table="usersTable">Download</button>data-tableis id of table to convert.table2csvis function that converts table in id ofdata-tableto csv file and downloads. Accepts 2 parameters:el. Required. Accepts object of button.endcut. Optional. Accept an integer to cut from end of table.