Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huanz/tableexport
tableExport(table导出文件,支持json、csv、txt、xml、word、excel、image、pdf)
https://github.com/huanz/tableexport
csv doc file image javascript json pdf xls xml
Last synced: about 6 hours ago
JSON representation
tableExport(table导出文件,支持json、csv、txt、xml、word、excel、image、pdf)
- Host: GitHub
- URL: https://github.com/huanz/tableexport
- Owner: huanz
- Created: 2014-10-17T04:25:56.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2019-10-29T13:57:27.000Z (about 5 years ago)
- Last Synced: 2024-08-09T14:57:35.775Z (3 months ago)
- Topics: csv, doc, file, image, javascript, json, pdf, xls, xml
- Language: JavaScript
- Homepage:
- Size: 146 KB
- Stars: 295
- Watchers: 17
- Forks: 141
- Open Issues: 17
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# tableExport.js
`table`导出文件,支持导出`json`、`txt`、`csv`、`xml`、`doc`、`xls`、`image`、 `pdf`。
## browsers
| Browser | Constructs as | Filenames | Max Blob Size | Dependencies |
| -------------- | ------------- | ------------ | ------------- | ------------ |
| Firefox 20+ | Blob | Yes | 800 MiB | None |
| Firefox < 20 | data: URI | No | n/a | [Blob.js](https://github.com/eligrey/Blob.js) |
| Chrome | Blob | Yes | [500 MiB][3] | None |
| Chrome for Android | Blob | Yes | [500 MiB][3] | None |
| Edge | Blob | Yes | ? | None |
| IE 10+ | Blob | Yes | 600 MiB | None |
| Opera 15+ | Blob | Yes | 500 MiB | None |
| Opera < 15 | data: URI | No | n/a | [Blob.js](https://github.com/eligrey/Blob.js) |
| Safari 6.1+* | Blob | No | ? | None |
| Safari < 6 | data: URI | No | n/a | [Blob.js](https://github.com/eligrey/Blob.js) |## usage
```shell
npm i table-export --save
``````javascript
var tableExport = require('table-export');
// dom id, filename, type: json, txt, csv, xml, doc, xsl, image, pdf
tableExport('table1', 'test', 'image');
```## build
```bash
git clone [email protected]:huanz/tableExport.git
cd tableExport
npm i// 开发
npm run dev// 构建个人版本
MODULES='doc xls image' npm run build
```