Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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)

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
```