Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
clarketm committed Nov 27, 2016
2 parents 905fc2c + 4fd2f0a commit 46fc463
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 42 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ The simple, easy-to-implement plugin to export HTML tables to xlsx, xls, csv, an

### Download and Setup

To use this plugin, include the [jQuery](https://jquery.com) library, [FileSaver.js](https://github.com/eligrey/FileSaver.js/) script, and [TableExport.js](https://www.travismclarke.com/tableexport) plugin before the closing `<body>` tag of your HTML document:
To use this plugin, include the [jQuery](https://jquery.com) library, [FileSaver.js](https://github.com/clarketm/FileSaver.js/) script, and [TableExport.js](https://www.travismclarke.com/tableexport) plugin before the closing `<body>` tag of your HTML document:

```html
<script src="jquery.js"></script>
<script src="filesaver.js"></script>
<script src="FileSaver.js"></script>
...
<script src="tableexport.js"></script>
```
Expand All @@ -29,16 +29,16 @@ $ npm install tableexport
### [CDNjs](https://cdnjs.com/libraries/TableExport)
| | uncompressed | compressed |
| :------: | :----------: | :--------: |
| __CSS__ | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.2.5/css/tableexport.css) | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.2.5/css/tableexport.min.css) |
| __JS__ | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.2.5/js/tableexport.js) | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.2.5/js/tableexport.min.js) |
| __Images__ | &mdash; | [🔗<sup>xlsx</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.2.5/img/xlsx.svg)[🔗<sup>xls</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.2.5/img/xls.svg)[🔗<sup>csv</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.2.5/img/csv.svg)[🔗<sup>txt</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.2.5/img/txt.svg) |
| __CSS__ | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.3.5/css/tableexport.css) | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.3.5/css/tableexport.min.css) |
| __JS__ | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.3.5/js/tableexport.js) | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.3.5/js/tableexport.min.js) |
| __Images__ | &mdash; | [🔗<sup>xlsx</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.3.5/img/xlsx.svg)[🔗<sup>xls</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.3.5/img/xls.svg)[🔗<sup>csv</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.3.5/img/csv.svg)[🔗<sup>txt</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.3.5/img/txt.svg) |

### Dependencies

#### Required:

* [jQuery](https://jquery.com) (1.2.1 or higher) `*`
* [FileSaver.js](https://github.com/eligrey/FileSaver.js/)
* [FileSaver.js](https://github.com/clarketm/FileSaver.js/)

> `*` jQuery dependency requirement is removed as of [4.0.0-alpha.1](https://github.com/clarketm/TableExport/tree/v4.0.0-alpha.1)
Expand All @@ -47,28 +47,28 @@ $ npm install tableexport
* [Bootstrap](http://getbootstrap.com/getting-started/#download) (3.1.0 or higher)

#### Add-Ons:
In order to provide **Office Open XML SpreadsheetML Format ( .xlsx )** support, you must include the following third-party script to your project before [FileSaver.js](https://github.com/eligrey/FileSaver.js/) and [TableExport.js](https://www.travismclarke.com/tableexport).
In order to provide **Office Open XML SpreadsheetML Format ( .xlsx )** support, you must include the following third-party script to your project before [FileSaver.js](https://github.com/clarketm/FileSaver.js/) and [TableExport.js](https://www.travismclarke.com/tableexport).

* [xlsx-core.js](https://github.com/SheetJS/js-xlsx) by _SheetJS_
* [xls.js](https://github.com/clarketm/js-xls) by _clarketm_

```html
<script src="xlsx-core.js"></script>
<script src="filesaver.js"></script>
<script src="xls.js"></script>
<script src="FileSaver.js"></script>
...
<script src="tableexport.js"></script>
```

#### Older Browsers:
To support older browsers ( **Chrome** < 20, **Firefox** < 13, **Opera** < 12.10, **IE** < 10, __Safari__ < 6 ) include the [Blob.js](https://github.com/clarketm/Blob.js/) polyfill before the [FileSaver.js](https://github.com/eligrey/FileSaver.js/) script.
To support older browsers ( **Chrome** < 20, **Firefox** < 13, **Opera** < 12.10, **IE** < 10, __Safari__ < 6 ) include the [Blob.js](https://github.com/clarketm/Blob.js/) polyfill before the [FileSaver.js](https://github.com/clarketm/FileSaver.js/) script.

Until [Safari](https://github.com/eligrey/FileSaver.js/issues/242) provides native support for either the [HTML5 download attribute](http://caniuse.com/#feat=download) or [service workers](http://caniuse.com/#search=service%20workers), limited `xlx` and `xlsx` support is provided by including the [Blob.js](https://github.com/clarketm/Blob.js/) polyfill, albeit the **filename** will always be labeled `Unknown`.
Until [Safari](https://github.com/clarketm/FileSaver.js/issues/242) provides native support for either the [HTML5 download attribute](http://caniuse.com/#feat=download) or [service workers](http://caniuse.com/#search=service%20workers), limited `xlx` and `xlsx` support is provided by including the [Blob.js](https://github.com/clarketm/Blob.js/) polyfill, albeit the **filename** will always be labeled `Unknown`.

* [Blob.js](https://github.com/clarketm/Blob.js) by _clarketm_

```html
<script src="xlsx-core.js"></script>
<script src="xls.js"></script>
<script src="Blob.js"></script>
<script src="filesaver.js"></script>
<script src="FileSaver.js"></script>
...
<script src="tableexport.js"></script>
```
Expand Down Expand Up @@ -221,13 +221,13 @@ $.fn.tableExport.rowDel = "\r\n";
*only _partial_ support for `xls` and `xlsx`: requires third-party dependency ([Blob.js](https://github.com/clarketm/Blob.js/))

### Live Demo
A live, interactive demo can be found **[here](https://www.travismclarke.com/tableexport/#live-demo)**
A live, interactive demo can be found **[here](https://www.travismclarke.com/tableexport/#live-demo)**. Also, check out the [TableExport + RequireJS](https://github.com/clarketm/tableexport_requirejs_app/blob/master/README.md) skeleton,

### License
[TableExport.js](https://www.travismclarke.com/tableexport) is licensed under the terms of the [MIT](http://opensource.org/licenses/mit-license.php) License

### Credits

* [John Resig](https://github.com/jeresig) - jQuery
* [SheetJS](https://github.com/SheetJS) - js-xlsx
* [SheetJS](https://github.com/SheetJS) - js-xls
* [Eli Grey](https://github.com/eligrey) - FileSaver.js & Blob.js
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"clarketm <[email protected]>"
],
"description": "The simple, easy-to-implement plugin to export HTML tables to xlsx, xls, csv, and txt files",
"main": "dist/js/tableexport.min.js",
"main": "dist/js/tableexport.js",
"keywords": [
"table",
"export",
Expand All @@ -21,8 +21,8 @@
"dependencies": {
"bootstrap": "~3.3.5",
"jquery": "~1.11.3",
"js-xlsx": "0.8.0",
"file-saver": "^1.3.3",
"xlsx-js": "^0.8.1",
"file-saverjs": "^1.3.3",
"blobjs": "^1.0.0"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion dist/css/tableexport.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@
.txt:before {
content: "";
background: purple url(../img/txt.svg) no-repeat center;
}
}
2 changes: 1 addition & 1 deletion dist/css/tableexport.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions dist/js/tableexport.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/*!
* TableExport.js 4.0.0-alpha.1 (https://www.travismclarke.com)
* TableExport.js 4.0.0-alpha.2 (https://www.travismclarke.com)
* Copyright 2016 Travis Clarke
* Licensed under the MIT license
*/

;(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['exports', 'jquery', 'blobjs', 'file-saver', 'xlsx'], factory);
define(['exports', 'jquery', 'blobjs', 'file-saverjs', 'xlsx-js'], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
// CommonJS
factory(exports, require('jquery'), require('blobjs'), require('file-saver'), require('xlsx'));
factory(exports, require('jquery'), require('blobjs'), require('file-saverjs'), require('xlsx-js'));
} else {
// Browser globals
factory(root, root.jQuery, root.Blob, root.saveAs, root.XLSX);
Expand Down Expand Up @@ -273,6 +273,11 @@
};

TableExport.prototype = {
/**
* Version.
* @memberof TableExport.prototype
*/
version: "4.0.0-alpha.2",
/**
* Default plugin options.
* @memberof TableExport.prototype
Expand Down Expand Up @@ -537,4 +542,4 @@
exports.default = exports.TableExport = TableExport;

}
));
));
Loading

0 comments on commit 46fc463

Please sign in to comment.