Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yunisdev/table2csv

Lightweight library to convert HTML table to CSV file
https://github.com/yunisdev/table2csv

convert csv html javascript js table

Last synced: about 1 month ago
JSON representation

Lightweight library to convert HTML table to CSV file

Awesome Lists containing this project

README

        

## Installation
Add following HTML before body end:
```html

```
or you can install using npm:
```bash
npm i yunisdev-table2csv
```

## Usage
You can use this library using following syntax:
```html
Download
```
- ```data-table``` is id of table to convert.
- ```table2csv``` is function that converts table in id of ```data-table``` to csv file and downloads. Accepts 2 parameters:
- ```el```. Required. Accepts object of button.
- ```endcut```. Optional. Accept an integer to cut from end of table.