Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dstuecken/exporttableascsv
Prototype JS Extension to export an HTML table as CSV
https://github.com/dstuecken/exporttableascsv
Last synced: 13 days ago
JSON representation
Prototype JS Extension to export an HTML table as CSV
- Host: GitHub
- URL: https://github.com/dstuecken/exporttableascsv
- Owner: dstuecken
- License: mit
- Created: 2014-05-27T12:31:40.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-31T17:36:44.000Z (over 10 years ago)
- Last Synced: 2024-04-15T00:21:33.685Z (7 months ago)
- Language: JavaScript
- Size: 152 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## exportTableAsCSV
================This is a Prototype (http://prototypejs.org/) extension to export an HTML table as CSV and directly sends it to the browser.
## Usage
The usage is pretty simple as it extends the Element Object by one method: exportTableAsCSV
```js
$('table-id').exportTableAsCSV();
``````js
$('table-id').exportTableAsCSV({
header: [
'my', 'custom', 'header', 'instead', 'of', 'the', 'regular', 'th', 'header'
]
});
``````js
$('table-id').exportTableAsCSV({
separator: ';' // use ; instead of , for separating
});
```