sheetjs/demos/browserify
SheetJS 7c7f4a69d4 version bump 0.11.9
- CLI `--book` convert all worksheets (fixes #701 h/t @pmelisko)
- Detect ";"-DSV with no "\t" or "," (fixes #875 h/t @sh977218)
- editable HTML uses spans for IE6+ compat (fixes #851 h/t @elogicmedia)
- XLSB formula structure parallels XLS (fixes #680 h/t @bstiel)
2017-11-15 13:14:02 -05:00
..
.gitignore demo refresh [ci skip] 2017-09-24 19:40:09 -04:00
app.js version bump 0.11.9 2017-11-15 13:14:02 -05:00
browserify.html demo refresh [ci skip] 2017-09-24 19:40:09 -04:00
Makefile demo refresh [ci skip] 2017-09-24 19:40:09 -04:00
README.md demo refresh [ci skip] 2017-09-24 19:40:09 -04:00
xlsxworker.js demo refresh [ci skip] 2017-09-24 19:40:09 -04:00

Browserify

The library is compatible with Browserify and should just work out of the box.

This demo uses the require form to expose the whole library, enabling client code to access the library with var XLSX = require('xlsx'). The JS code from the root demo was moved to a separate app.js script. That script is bundled:

browserify app.js > browserify.js
uglifyjs browserify.js > browserify.min.js

Worker Scripts

Browserify can also bundle worker scripts! Instead of using importScripts, the worker script should require the module:

-importScripts('dist/xlsx.full.min.js');
+var XLSX = require('xlsx');

The same process generates the worker script:

browserify xlsxworker.js > worker.js
uglifyjs worker.js > worker.min.js

Analytics