Socket
Socket
Sign inDemoInstall

xlsx

Package Overview
Dependencies
9
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.12 to 0.8.0

5

bower.json

@@ -5,3 +5,3 @@ {

"main": "dist/xlsx.js",
"version": "0.7.12",
"version": "0.8.0",
"ignore": [

@@ -15,2 +15,4 @@ "bin",

"excel",
"xls",
"xml",
"xlsx",

@@ -20,4 +22,5 @@ "xlsm",

"ods",
"js-xls"
"js-xlsx"
]
}

@@ -18,2 +18,8 @@ /* ods.js (C) 2014 SheetJS -- http://sheetjs.com */

var has_buf = (typeof Buffer !== 'undefined');
function cc2str(arr) {
var o = "";
for(var i = 0; i != arr.length; ++i) o += String.fromCharCode(arr[i]);
return o;
}
function getdata(data) {

@@ -20,0 +26,0 @@ if(!data) return null;

@@ -18,2 +18,8 @@ /* ods.js (C) 2014 SheetJS -- http://sheetjs.com */

var has_buf = (typeof Buffer !== 'undefined');
function cc2str(arr) {
var o = "";
for(var i = 0; i != arr.length; ++i) o += String.fromCharCode(arr[i]);
return o;
}
function getdata(data) {

@@ -20,0 +26,0 @@ if(!data) return null;

12

package.json
{
"name": "xlsx",
"version": "0.7.12",
"version": "0.8.0",
"author": "sheetjs",
"description": "Excel 2007+ spreadsheet (XLSB/XLSX/XLSM) and ODS parser and writer",
"keywords": [ "excel", "xlsx", "xlsb", "xlsm", "ods", "office", "spreadsheet" ],
"description": "Excel (XLSB/XLSX/XLSM/XLS/XML) and ODS spreadsheet parser and writer",
"keywords": [ "excel", "xls", "xlsx", "xlsb", "xlsm", "ods", "office", "spreadsheet" ],
"bin": {

@@ -23,4 +23,3 @@ "xlsx": "./bin/xlsx.njs"

"xlsjs":"",
"uglify-js":"",
"jasmine-node": "x"
"uglify-js":""
},

@@ -30,4 +29,3 @@ "repository": { "type":"git", "url":"git://github.com/SheetJS/js-xlsx.git" },

"pretest": "git submodule init && git submodule update",
"test": "make test",
"test-jasmine": "jasmine-node --verbose tests/"
"test": "make test"
},

@@ -34,0 +32,0 @@ "config": {

# xlsx
Parser and writer for Excel 2007+ (XLSX/XLSM/XLSB) files and parser for ODS.
Pure-JS cleanroom implementation from the Office Open XML spec, [MS-XLSB], ODF
specifications and related documents.
Parser and writer for various spreadsheet formats. Pure-JS cleanroom
implementation from official specifications and related documents.
Supported read formats:
- Excel 2007+ XML Formats (XLSX/XLSM)
- Excel 2007+ Binary Format (XLSB)
- Excel 2003-2004 XML Format (XML "SpreadsheetML")
- Excel 97-2004 (XLS BIFF8)
- Excel 5.0/95 (XLS BIFF5)
- OpenDocument Spreadsheet (ODS)
Supported write formats:
- XLSX
- CSV (and general DSV)
- JSON and JS objects (various styles)
Demo: <http://oss.sheetjs.com/js-xlsx>

@@ -13,3 +27,3 @@

In [nodejs](https://www.npmjs.org/package/xlsx):
With [npm](https://www.npmjs.org/package/xlsx):

@@ -22,3 +36,3 @@ npm install xlsx

In [bower](http://bower.io/search/?q=js-xlsx):
With [bower](http://bower.io/search/?q=js-xlsx):

@@ -32,3 +46,3 @@ bower install js-xlsx

The nodejs version automatically requires modules for additional features. Some
The node version automatically requires modules for additional features. Some
of these modules are rather large in size and are only needed in special

@@ -62,3 +76,3 @@ circumstances, so they do not ship with the core. For browser use, they must

- nodejs readFile:
- node readFile:

@@ -149,9 +163,28 @@ ```

This example walks through every cell of every sheet and dumps the values:
The full object format is described later in this README.
This example extracts the value stored in cell A1 from the first worksheet:
```
var first_sheet_name = workbook.SheetNames[0];
var address_of_cell = 'A1';
/* Get worksheet */
var worksheet = workbook.Sheets[first_sheet_name];
/* Find desired cell */
var desired_cell = worksheet[address_of_cell];
/* Get the value */
var desired_value = desired_cell.v;
```
This example iterates through every nonempty of every sheet and dumps values:
```
var sheet_name_list = workbook.SheetNames;
sheet_name_list.forEach(function(y) {
sheet_name_list.forEach(function(y) { /* iterate through sheets */
var worksheet = workbook.Sheets[y];
for (z in worksheet) {
/* all keys that do not begin with "!" correspond to cell addresses */
if(z[0] === '!') continue;

@@ -174,5 +207,5 @@ console.log(y + "!" + z + "=" + JSON.stringify(worksheet[z].v));

- <https://github.com/SheetJS/js-xlsx/blob/master/bin/xlsx.njs> nodejs
- <https://github.com/SheetJS/js-xlsx/blob/master/bin/xlsx.njs> node
The nodejs version installs a binary `xlsx` which can read XLSX/XLSM/XLSB
The node version installs a command line tool `xlsx` which can read spreadsheet
files and output the contents in various formats. The source is available at

@@ -229,3 +262,3 @@ `xlsx.njs` in the bin directory.

`XLSX` is the exposed variable in the browser and the exported nodejs variable
`XLSX` is the exposed variable in the browser and the exported node variable

@@ -384,3 +417,4 @@ `XLSX.version` is the version of the library (added by the build script).

`wb.Props` is an object storing the standard properties. `wb.Custprops` stores
custom properties.
custom properties. Since the XLS standard properties deviate from the XLSX
standard, XLS parsing stores core properties in both places. .

@@ -394,3 +428,3 @@

| :---------- | ------: | :---------- |
| cellFormula | true | Save formulae to the .f field |
| cellFormula | true | Save formulae to the .f field ** |
| cellHTML | true | Parse rich text and save HTML to the .h field |

@@ -407,3 +441,6 @@ | cellNF | false | Save number format string to the .z field |

| bookVBA | false | If true, expose vbaProject.bin to `vbaraw` field ** |
| password | "" | If defined and file is encrypted, use password ** |
- `cellFormula` option only applies to formats that require extra processing to
parse formulae (XLS/XLSB).
- Even if `cellNF` is false, formatted text will be generated and saved to `.w`

@@ -413,4 +450,6 @@ - In some cases, sheets may be parsed even if `bookSheets` is false.

- `Deps` will be an empty object if `bookDeps` is falsy
- `bookFiles` adds a `keys` array (paths in the ZIP) and a `files` hash (whose
keys are paths and values are objects representing the files)
- `bookFiles` behavior depends on file type:
* `keys` array (paths in the ZIP) for ZIP-based formats
* `files` hash (mapping paths to objects representing the files) for ZIP
* `cfb` object for formats using CFB containers
- `sheetRows-1` rows will be generated when looking at the JSON object output

@@ -420,2 +459,4 @@ (since the header row is counted as a row when parsing the data)

- `cellDates` currently does not convert numerical dates to JS dates.
- Currently only XOR encryption is supported. Unsupported error will be thrown
for files employing other encryption methods.

@@ -445,3 +486,3 @@ The defaults are enumerated in bits/84_defaults.js

- NodeJS 0.8, 0.10 (latest release), 0.11 (unstable)
- NodeJS 0.8, 0.10 (latest release), 0.11.14 (unstable), io.js
- IE 6/7/8/9/10/11 using Base64 mode (IE10/11 using HTML5 mode)

@@ -465,3 +506,3 @@ - FF 18 using Base64 or HTML5 mode

`make test` will run the nodejs-based tests. To run the in-browser tests, clone
`make test` will run the node-based tests. To run the in-browser tests, clone
[the oss.sheetjs.com repo](https://github.com/SheetJS/SheetJS.github.io) and

@@ -498,6 +539,2 @@ replace the xlsx.js file (then fire up the browser and go to `stress.html`):

## XLS Support
XLS is available in [js-xls](http://git.io/xls).
## License

@@ -524,3 +561,14 @@

- [MS-OE376]: Office Implementation Information for ECMA-376 Standards Support
- [MS-CFB]: Compound File Binary File Format
- [MS-XLS]: Excel Binary File Format (.xls) Structure Specification
- [MS-ODATA]: Open Data Protocol (OData)
- [MS-OFFCRYPTO]: Office Document Cryptography Structure
- [MS-OLEDS]: Object Linking and Embedding (OLE) Data Structures
- [MS-OLEPS]: Object Linking and Embedding (OLE) Property Set Data Structures
- [MS-OSHARED]: Office Common Data Types and Objects Structures
- [MS-OVBA]: Office VBA File Format Structure
- [MS-CTXLS]: Excel Custom Toolbar Binary File Format
- [MS-XLDM]: Spreadsheet Data Model File Format
- [MS-EXSPXML3]: Excel Calculation Version 2 Web Service XML Schema
- [XLS]: Microsoft Office Excel 97-2007 Binary File Format Specification

@@ -527,0 +575,0 @@ Open Document Format for Office Applications Version 1.2 (29 September 2011)

@@ -1,2 +0,2 @@

/* xlsx.js (C) 2013-2014 SheetJS -- http://sheetjs.com */
/* xlsx.js (C) 2013-2015 SheetJS -- http://sheetjs.com */
/* uncomment the next line for encoding support */

@@ -3,0 +3,0 @@ //importScripts('dist/cpexcel.js');

@@ -1,2 +0,2 @@

/* xlsx.js (C) 2013-2014 SheetJS -- http://sheetjs.com */
/* xlsx.js (C) 2013-2015 SheetJS -- http://sheetjs.com */
/* uncomment the next line for encoding support */

@@ -3,0 +3,0 @@ //importScripts('dist/cpexcel.js');

@@ -1,2 +0,2 @@

/* xlsx.js (C) 2013-2014 SheetJS -- http://sheetjs.com */
/* xlsx.js (C) 2013-2015 SheetJS -- http://sheetjs.com */
/* uncomment the next line for encoding support */

@@ -3,0 +3,0 @@ //importScripts('dist/cpexcel.js');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc