{"_id":"@croquiscom/xlsx","_rev":"41-f1471b0aff1a24342674e76afca875d4","name":"@croquiscom/xlsx","dist-tags":{"latest":"0.11.17-cr4"},"versions":{"0.11.17-cr3":{"name":"@croquiscom/xlsx","version":"0.11.17-cr3","keywords":["excel","xls","xlsx","xlsb","xlsm","ods","csv","dbf","dif","sylk","office","spreadsheet"],"author":{"name":"sheetjs"},"license":"Apache-2.0","_id":"@croquiscom/xlsx@0.11.17-cr3","maintainers":[{"name":"croquiscom","email":"admin@croquis.com"}],"homepage":"http://sheetjs.com/opensource","bugs":{"url":"https://github.com/SheetJS/js-xlsx/issues"},"bin":{"xlsx":"./bin/xlsx.njs"},"alex":{"allow":["wtf","holes"]},"dist":{"shasum":"0b2dfb71fc46b3b34d9744e2b9aee70932a945ae","tarball":"https://registry.npmjs.org/@croquiscom/xlsx/-/xlsx-0.11.17-cr3.tgz","integrity":"sha512-BOXjkvamwy0Sqd8iqkmt0TBPJI6el0YF7VO0ykLrEoJz7Owmid7oNOrjzAbmNKW3cHUE+cwdc12frpGCzTiTGw==","signatures":[{"sig":"MEUCIDvQh1/6TWccptIXMscWGk60V0+jQ8BlCKc7JApiRB49AiEAwuJ9toAloaWy2NcVtKa+zFstvbLj9v9YotU/dIFjUXk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./xlsx","types":"types","config":{"blanket":{"pattern":"xlsx.js"}},"browser":{"fs":false,"node":false,"crypto":false,"stream":false,"process":false},"engines":{"node":">=0.8"},"gitHead":"1bef2baf2c26a963e5dd667207f021f189374916","scripts":{"lint":"make fullint","test":"make travis","build":"make","dtslint":"dtslint types","pretest":"git submodule init && git submodule update"},"_npmUser":{"name":"croquiscom","email":"admin@croquis.com"},"repository":{"url":"git://github.com/SheetJS/js-xlsx.git","type":"git"},"_npmVersion":"5.6.0","description":"SheetJS Spreadsheet data parser and writer","directories":{},"_nodeVersion":"8.9.0","dependencies":{"cfb":"~1.0.1","ssf":"~0.10.1","crc-32":"~1.1.1","adler-32":"~1.1.0","codepage":"~1.11.0","commander":"~2.11.0","exit-on-epipe":"~1.0.1"},"devDependencies":{"jsdom":"~11.1.0","mocha":"~2.5.3","blanket":"~1.2.3","dtslint":"^0.1.2","typescript":"2.2.0","@types/node":"^8.0.7","@types/commander":"^2.9.0","@sheetjs/uglify-js":"~2.7.3"},"_npmOperationalInternal":{"tmp":"tmp/xlsx-0.11.17-cr3.tgz_1515649952743_0.8415506745222956","host":"s3://npm-registry-packages"}},"0.11.17-cr4":{"name":"@croquiscom/xlsx","version":"0.11.17-cr4","keywords":["excel","xls","xlsx","xlsb","xlsm","ods","csv","dbf","dif","sylk","office","spreadsheet"],"author":{"name":"sheetjs"},"license":"Apache-2.0","_id":"@croquiscom/xlsx@0.11.17-cr4","maintainers":[{"name":"croquiscom","email":"admin@croquis.com"}],"homepage":"http://sheetjs.com/opensource","bugs":{"url":"https://github.com/SheetJS/js-xlsx/issues"},"bin":{"xlsx":"./bin/xlsx.njs"},"alex":{"allow":["wtf","holes"]},"dist":{"shasum":"8901ef05280136ccbdbda0081f7d833f2882f25f","tarball":"https://registry.npmjs.org/@croquiscom/xlsx/-/xlsx-0.11.17-cr4.tgz","integrity":"sha512-ZmSIf66TM4SqHx0MNmhPefgUuqoGDA/WvaJ0apnHs2sYPci5LHbsO12OxyBUlhEqoih/4BWYwg1ttHNALdLMaQ==","signatures":[{"sig":"MEUCICNZJmUN6Zv/gUjOlaBqnMfQJGQ3IKKdWc5PZxjLSCl+AiEAimpPhzqyxMMl7IOPBTg7yQ0i6YwGiI5kROwUavbwrv8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzeOHCRA9TVsSAnZWagAA46QP/RN+Jq+nw31ZH3ghfkQm\nQ6bEndA272kPVBg//uXe889na3IEResmBZUvN7lCyRMbJIHJTgSRyeL1xDWp\nMOV83xJmupmO/cutQEYr8w9Zo7kgXeo9bruu8mg4ON1s7QnAmZLC9ppRy2V5\n+ZiOjTesMg5Hun4SGqpX77jtr3odr88SkOQUTfvbV8dG9P84sKv0BceNgM/e\n774u2IT+D0fILaxA7WNzCs5YjRiKihKLhKGYstUZl7NSmBrdS5dTuTsjix4i\nYzhu7Y/oVkkkZ4cOQSDDVj7Z8M8aXNVscLpRrGSVYxzHhSksUO8Y4iNHXZj7\nbXd5MYBGOjxwR8qQS+VJTmA9uDkwSvWkBS1+/knWxA2XacsB5A1Xlvt2Z5yc\njeNtkbRTitBw0IlPTLF0c6tCqPq47d2XZmf9+w1f1GGB2HMPakzCpoZaahlS\npGqnAH1r8zTRtzlarx6rBDTrl6WVQ0p4Zc+xcJ7XfLzKFtvjRrZgzoqn4Ir4\nW5WGMnNnystsbKvEwDkgu9+9VNfRcw8ucUJZMnGjnqdl0edvLSYVPjMfpS3E\nTPg16LJraAuSM49E8G9EG6aNl5qSZo4KWPCQ/ILa2qoJu4bDekUaKyLyUJWV\nLutIZCyWyvoqeJlTOKSBYMsWEyrwzY+HK3Hw9ZKaEkyYAhjO0M3f9KKw0vjB\npUum\r\n=lE8R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./xlsx","types":"types","config":{"blanket":{"pattern":"xlsx.js"}},"browser":{"fs":false,"node":false,"crypto":false,"stream":false,"process":false},"engines":{"node":">=0.8"},"gitHead":"2d1f285a58b701a881a674354403cf4aa3ebdd03","scripts":{"lint":"make fullint","test":"make travis","build":"make","dtslint":"dtslint types","pretest":"git submodule init && git submodule update"},"_npmUser":{"name":"croquiscom","email":"admin@croquis.com"},"repository":{"url":"git://github.com/SheetJS/js-xlsx.git","type":"git"},"_npmVersion":"5.6.0","description":"SheetJS Spreadsheet data parser and writer","directories":{},"_nodeVersion":"8.9.0","dependencies":{"cfb":"~1.0.1","ssf":"~0.10.1","crc-32":"~1.1.1","adler-32":"~1.1.0","codepage":"~1.11.0","commander":"~2.11.0","exit-on-epipe":"~1.0.1"},"devDependencies":{"jsdom":"~11.1.0","mocha":"~2.5.3","blanket":"~1.2.3","dtslint":"^0.1.2","typescript":"2.2.0","@types/node":"^8.0.7","@types/commander":"^2.9.0","@sheetjs/uglify-js":"~2.7.3"},"_npmOperationalInternal":{"tmp":"tmp/xlsx-0.11.17-cr4.tgz_1515727277440_0.709036307875067","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-01-11T01:54:45.615Z","modified":"2026-08-06T05:50:13.381Z","0.11.17":"2018-01-11T01:54:45.615Z","0.11.17-cr1":"2018-01-11T01:56:15.495Z","0.11.17-cr2":"2018-01-11T05:03:01.339Z","0.11.17-cr3":"2018-01-11T05:52:32.940Z","0.11.17-cr4":"2018-01-12T03:21:17.692Z"},"bugs":{"url":"https://github.com/SheetJS/js-xlsx/issues"},"author":{"name":"sheetjs"},"license":"Apache-2.0","homepage":"http://sheetjs.com/opensource","keywords":["excel","xls","xlsx","xlsb","xlsm","ods","csv","dbf","dif","sylk","office","spreadsheet"],"repository":{"url":"git://github.com/SheetJS/js-xlsx.git","type":"git"},"description":"SheetJS Spreadsheet data parser and writer","maintainers":[{"email":"joo.inthezoo@kakaostyle.com","name":"joointhezoo"},{"email":"admin.dev@kakaostyle.com","name":"croquiscom-admin"},{"email":"sixmen@gmail.com","name":"sixmen"},{"email":"hexa1214@gmail.com","name":"zao1214"},{"email":"hbh2692@naver.com","name":"nabigraphics"},{"email":"colin.kwon@kakaostyle.com","name":"colin.kwon"},{"email":"pepper.ha@kakaostyle.com","name":"pepper.ha"},{"email":"sally.914@kakaostyle.com","name":"olive-sally"},{"email":"yoo2001818@gmail.com","name":"yoo2001818"},{"email":"tim.jlee@kakaostyle.com","name":"tim.jlee"},{"email":"dark.0@kakaostyle.com","name":"dark.0"},{"email":"gommpo111@gmail.com","name":"sungin"},{"email":"joe.725@kakaostyle.com","name":"joe.725"},{"email":"day.0709@kakaostyle.com","name":"day.0709"},{"email":"dan.psk@kakaostyle.com","name":"dan.psk"},{"email":"evan.oh@kakaostyle.com","name":"minhyung"}],"readme":"# [SheetJS js-xlsx](http://sheetjs.com)\n\nParser and writer for various spreadsheet formats.  Pure-JS cleanroom\nimplementation from official specifications, related documents, and test files.\nEmphasis on parsing and writing robustness, cross-format feature compatibility\nwith a unified JS representation, and ES3/ES5 browser compatibility back to IE6.\n\nThis is the community version.  We also offer a pro version with performance\nenhancements, additional features by request, and dedicated support.\n\n\n[**Pro Version**](http://sheetjs.com/pro)\n\n[**Commercial Support**](http://sheetjs.com/support)\n\n[**Rendered Documentation**](http://docs.sheetjs.com/)\n\n[**In-Browser Demos**](http://sheetjs.com/demos)\n\n[**Source Code**](http://git.io/xlsx)\n\n[**Issues and Bug Reports**](https://github.com/sheetjs/js-xlsx/issues)\n\n[**Other General Support Issues**](https://discourse.sheetjs.com)\n\n[**File format support for known spreadsheet data formats:**](#file-formats)\n\n<details>\n  <summary><b>Graph of supported formats</b> (click to show)</summary>\n\n![circo graph of format support](formats.png)\n\n![graph legend](legend.png)\n\n</details>\n\n[**Browser Test**](http://oss.sheetjs.com/js-xlsx/tests/)\n\n[![Build Status](https://saucelabs.com/browser-matrix/sheetjs.svg)](https://saucelabs.com/u/sheetjs)\n\n[![Build Status](https://travis-ci.org/SheetJS/js-xlsx.svg?branch=master)](https://travis-ci.org/SheetJS/js-xlsx)\n[![Build Status](https://semaphoreci.com/api/v1/sheetjs/js-xlsx/branches/master/shields_badge.svg)](https://semaphoreci.com/sheetjs/js-xlsx)\n[![Coverage Status](http://img.shields.io/coveralls/SheetJS/js-xlsx/master.svg)](https://coveralls.io/r/SheetJS/js-xlsx?branch=master)\n[![Dependencies Status](https://david-dm.org/sheetjs/js-xlsx/status.svg)](https://david-dm.org/sheetjs/js-xlsx)\n[![npm Downloads](https://img.shields.io/npm/dt/xlsx.svg)](https://npmjs.org/package/xlsx)\n[![ghit.me](https://ghit.me/badge.svg?repo=sheetjs/js-xlsx)](https://ghit.me/repo/sheetjs/js-xlsx)\n[![Analytics](https://ga-beacon.appspot.com/UA-36810333-1/SheetJS/js-xlsx?pixel)](https://github.com/SheetJS/js-xlsx)\n\n## Table of Contents\n\n<details>\n  <summary><b>Expand to show Table of Contents</b></summary>\n\n<!-- toc -->\n\n- [Installation](#installation)\n  * [JS Ecosystem Demos](#js-ecosystem-demos)\n  * [Optional Modules](#optional-modules)\n  * [ECMAScript 5 Compatibility](#ecmascript-5-compatibility)\n- [Philosophy](#philosophy)\n- [Parsing Workbooks](#parsing-workbooks)\n  * [Parsing Examples](#parsing-examples)\n  * [Streaming Read](#streaming-read)\n- [Working with the Workbook](#working-with-the-workbook)\n  * [Parsing and Writing Examples](#parsing-and-writing-examples)\n- [Writing Workbooks](#writing-workbooks)\n  * [Writing Examples](#writing-examples)\n  * [Streaming Write](#streaming-write)\n- [Interface](#interface)\n  * [Parsing functions](#parsing-functions)\n  * [Writing functions](#writing-functions)\n  * [Utilities](#utilities)\n- [Common Spreadsheet Format](#common-spreadsheet-format)\n  * [General Structures](#general-structures)\n  * [Cell Object](#cell-object)\n    + [Data Types](#data-types)\n    + [Dates](#dates)\n  * [Sheet Objects](#sheet-objects)\n    + [Worksheet Object](#worksheet-object)\n    + [Chartsheet Object](#chartsheet-object)\n    + [Macrosheet Object](#macrosheet-object)\n    + [Dialogsheet Object](#dialogsheet-object)\n  * [Workbook Object](#workbook-object)\n    + [Workbook File Properties](#workbook-file-properties)\n  * [Workbook-Level Attributes](#workbook-level-attributes)\n    + [Defined Names](#defined-names)\n    + [Workbook Views](#workbook-views)\n    + [Miscellaneous Workbook Properties](#miscellaneous-workbook-properties)\n  * [Document Features](#document-features)\n    + [Formulae](#formulae)\n    + [Column Properties](#column-properties)\n    + [Row Properties](#row-properties)\n    + [Number Formats](#number-formats)\n    + [Hyperlinks](#hyperlinks)\n    + [Cell Comments](#cell-comments)\n    + [Sheet Visibility](#sheet-visibility)\n    + [VBA and Macros](#vba-and-macros)\n- [Parsing Options](#parsing-options)\n  * [Input Type](#input-type)\n  * [Guessing File Type](#guessing-file-type)\n- [Writing Options](#writing-options)\n  * [Supported Output Formats](#supported-output-formats)\n  * [Output Type](#output-type)\n- [Utility Functions](#utility-functions)\n  * [Array of Arrays Input](#array-of-arrays-input)\n  * [Array of Objects Input](#array-of-objects-input)\n  * [HTML Table Input](#html-table-input)\n  * [Formulae Output](#formulae-output)\n  * [Delimiter-Separated Output](#delimiter-separated-output)\n    + [UTF-16 Unicode Text](#utf-16-unicode-text)\n  * [HTML Output](#html-output)\n  * [JSON](#json)\n- [File Formats](#file-formats)\n  * [Excel 2007+ XML (XLSX/XLSM)](#excel-2007-xml-xlsxxlsm)\n  * [Excel 2.0-95 (BIFF2/BIFF3/BIFF4/BIFF5)](#excel-20-95-biff2biff3biff4biff5)\n  * [Excel 97-2004 Binary (BIFF8)](#excel-97-2004-binary-biff8)\n  * [Excel 2003-2004 (SpreadsheetML)](#excel-2003-2004-spreadsheetml)\n  * [Excel 2007+ Binary (XLSB, BIFF12)](#excel-2007-binary-xlsb-biff12)\n  * [Delimiter-Separated Values (CSV/TXT)](#delimiter-separated-values-csvtxt)\n  * [Other Workbook Formats](#other-workbook-formats)\n    + [Lotus 1-2-3 (WKS/WK1/WK2/WK3/WK4/123)](#lotus-1-2-3-wkswk1wk2wk3wk4123)\n    + [Quattro Pro (WQ1/WQ2/WB1/WB2/WB3/QPW)](#quattro-pro-wq1wq2wb1wb2wb3qpw)\n    + [OpenDocument Spreadsheet (ODS/FODS)](#opendocument-spreadsheet-odsfods)\n    + [Uniform Office Spreadsheet (UOS1/2)](#uniform-office-spreadsheet-uos12)\n  * [Other Single-Worksheet Formats](#other-single-worksheet-formats)\n    + [dBASE and Visual FoxPro (DBF)](#dbase-and-visual-foxpro-dbf)\n    + [Symbolic Link (SYLK)](#symbolic-link-sylk)\n    + [Lotus Formatted Text (PRN)](#lotus-formatted-text-prn)\n    + [Data Interchange Format (DIF)](#data-interchange-format-dif)\n    + [HTML](#html)\n    + [Rich Text Format (RTF)](#rich-text-format-rtf)\n    + [Ethercalc Record Format (ETH)](#ethercalc-record-format-eth)\n- [Testing](#testing)\n  * [Node](#node)\n  * [Browser](#browser)\n  * [Tested Environments](#tested-environments)\n  * [Test Files](#test-files)\n- [Contributing](#contributing)\n  * [OSX/Linux](#osxlinux)\n  * [Windows](#windows)\n  * [Tests](#tests)\n- [License](#license)\n- [References](#references)\n\n<!-- tocstop -->\n\n</details>\n\n## Installation\n\nIn the browser, just add a script tag:\n\n```html\n<script lang=\"javascript\" src=\"dist/xlsx.full.min.js\"></script>\n```\n\n<details>\n  <summary><b>CDN Availability</b> (click to show)</summary>\n\n|    CDN     | URL                                      |\n|-----------:|:-----------------------------------------|\n|    `unpkg` | <https://unpkg.com/xlsx/>                |\n| `jsDelivr` | <https://jsdelivr.com/package/npm/xlsx>  |\n|    `CDNjs` | <http://cdnjs.com/libraries/xlsx>        |\n\n`unpkg` makes the latest version available at:\n\n```html\n<script src=\"https://unpkg.com/xlsx/dist/xlsx.full.min.js\"></script>\n```\n\n</details>\n\n\nWith [npm](https://www.npmjs.org/package/xlsx):\n\n```bash\n$ npm install xlsx\n```\n\nWith [bower](http://bower.io/search/?q=js-xlsx):\n\n```bash\n$ bower install js-xlsx\n```\n\n### JS Ecosystem Demos\n\nThe [`demos` directory](demos/) includes sample projects for:\n\n**Frameworks and APIs**\n- [`angular 1.x`](demos/angular/)\n- [`angular 2 / 4 / 5 and ionic`](demos/angular2/)\n- [`meteor`](demos/meteor/)\n- [`react and react-native`](demos/react/)\n- [`vue 2.x and weex`](demos/vue/)\n- [`XMLHttpRequest and fetch`](demos/xhr/)\n- [`nodejs server`](demos/server/)\n\n**Bundlers and Tooling**\n- [`browserify`](demos/browserify/)\n- [`requirejs`](demos/requirejs/)\n- [`rollup`](demos/rollup/)\n- [`systemjs`](demos/systemjs/)\n- [`typescript`](demos/typescript/)\n- [`webpack 2.x`](demos/webpack/)\n\n**Platforms and Integrations**\n- [`electron application`](demos/electron/)\n- [`nw.js application`](demos/nwjs/)\n- [`Adobe ExtendScript`](demos/extendscript/)\n- [`Headless Browsers`](demos/headless/)\n- [`canvas-datagrid`](demos/datagrid/)\n- [`Swift JSC and other engines`](demos/altjs/)\n\n### Optional Modules\n\n<details>\n  <summary><b>Optional features</b> (click to show)</summary>\n\nThe node version automatically requires modules for additional features.  Some\nof these modules are rather large in size and are only needed in special\ncircumstances, so they do not ship with the core.  For browser use, they must\nbe included directly:\n\n```html\n<!-- international support from js-codepage -->\n<script src=\"dist/cpexcel.js\"></script>\n```\n\nAn appropriate version for each dependency is included in the dist/ directory.\n\nThe complete single-file version is generated at `dist/xlsx.full.min.js`\n\nWebpack and Browserify builds include optional modules by default.  Webpack can\nbe configured to remove support with `resolve.alias`:\n\n```js\n  /* uncomment the lines below to remove support */\n  resolve: {\n    alias: { \"./dist/cpexcel.js\": \"\" } // <-- omit international support\n  }\n```\n\n</details>\n\n### ECMAScript 5 Compatibility\n\nSince the library uses functions like `Array#forEach`, older browsers require\n[shims to provide missing functions](http://oss.sheetjs.com/js-xlsx/shim.js).\n\nTo use the shim, add the shim before the script tag that loads `xlsx.js`:\n\n```html\n<!-- add the shim first -->\n<script type=\"text/javascript\" src=\"shim.js\"></script>\n<!-- after the shim is referenced, add the library -->\n<script type=\"text/javascript\" src=\"xlsx.full.min.js\"></script>\n```\n\n## Philosophy\n\n<details>\n  <summary><b>Philosophy</b> (click to show)</summary>\n\nPrior to SheetJS, APIs for processing spreadsheet files were format-specific.\nThird-party libraries either supported one format, or they involved a separate\nset of classes for each supported file type.  Even though XLSB was introduced in\nExcel 2007, nothing outside of SheetJS or Excel supported the format.\n\nTo promote a format-agnostic view, js-xlsx starts from a pure-JS representation\nthat we call the [\"Common Spreadsheet Format\"](#common-spreadsheet-format).\nEmphasizing a uniform object representation enables new features like format\nconversion (reading an XLSX template and saving as XLS) and circumvents the\n\"class trap\".  By abstracting the complexities of the various formats, tools\nneed not worry about the specific file type!\n\nA simple object representation combined with careful coding practices enables\nuse cases in older browsers and in alternative environments like ExtendScript\nand Web Workers. It is always tempting to use the latest and greatest features,\nbut they tend to require the latest versions of browsers, limiting usability.\n\nUtility functions capture common use cases like generating JS objects or HTML.\nMost simple operations should only require a few lines of code.  More complex\noperations generally should be straightforward to implement.\n\nExcel pushes the XLSX format as default starting in Excel 2007.  However, there\nare other formats with more appealing properties.  For example, the XLSB format\nis spiritually similar to XLSX but files often tend up taking less than half the\nspace and open much faster!  Even though an XLSX writer is available, other\nformat writers are available so users can take advantage of the unique\ncharacteristics of each format.\n\n</details>\n\n## Parsing Workbooks\n\nFor parsing, the first step is to read the file.  This involves acquiring the\ndata and feeding it into the library.  Here are a few common scenarios:\n\n<details>\n  <summary><b>nodejs read a file</b> (click to show)</summary>\n\n`readFile` is only available in server environments. Browsers have no API for\nreading arbitrary files given a path, so another strategy must be used.\n\n```js\nif(typeof require !== 'undefined') XLSX = require('xlsx');\nvar workbook = XLSX.readFile('test.xlsx');\n/* DO SOMETHING WITH workbook HERE */\n```\n\n</details>\n\n<details>\n  <summary><b>Browser read TABLE element from page</b> (click to show)</summary>\n\nThe `table_to_book` and `table_to_sheet` utility functions take a DOM TABLE\nelement and iterate through the child nodes.\n\n```js\nvar worksheet = XLSX.utils.table_to_book(document.getElementById('tableau'));\n/* DO SOMETHING WITH workbook HERE */\n```\n\nAlternatively, the HTML code can be extracted and parsed:\n\n```js\nvar htmlstr = document.getElementById('tableau').outerHTML;\nvar worksheet = XLSX.read(htmlstr, {type:'string'});\n```\n\n</details>\n\n<details>\n  <summary><b>Browser download file (ajax)</b> (click to show)</summary>\n\nNote: for a more complete example that works in older browsers, check the demo\nat <http://oss.sheetjs.com/js-xlsx/ajax.html>).  The <demos/xhr/> directory also\nincludes more examples with `XMLHttpRequest` and `fetch`.\n\n```js\nvar url = \"http://oss.sheetjs.com/test_files/formula_stress_test.xlsx\";\n\n/* set up async GET request */\nvar req = new XMLHttpRequest();\nreq.open(\"GET\", url, true);\nreq.responseType = \"arraybuffer\";\n\nreq.onload = function(e) {\n  var data = new Uint8Array(req.response);\n  var workbook = XLSX.read(data, {type:\"array\"});\n\n  /* DO SOMETHING WITH workbook HERE */\n}\n\nreq.send();\n```\n\n</details>\n\n<details>\n  <summary><b>Browser drag-and-drop</b> (click to show)</summary>\n\nDrag-and-drop uses the HTML5 `FileReader` API, loading the data with\n`readAsBinaryString` or `readAsArrayBuffer`.  Since not all browsers support the\nfull `FileReader` API, dynamic feature tests are highly recommended.\n\n```js\nvar rABS = true; // true: readAsBinaryString ; false: readAsArrayBuffer\nfunction handleDrop(e) {\n  e.stopPropagation(); e.preventDefault();\n  var files = e.dataTransfer.files, f = files[0];\n  var reader = new FileReader();\n  reader.onload = function(e) {\n    var data = e.target.result;\n    if(!rABS) data = new Uint8Array(data);\n    var workbook = XLSX.read(data, {type: rABS ? 'binary' : 'array'});\n\n    /* DO SOMETHING WITH workbook HERE */\n  };\n  if(rABS) reader.readAsBinaryString(f); else reader.readAsArrayBuffer(f);\n}\ndrop_dom_element.addEventListener('drop', handleDrop, false);\n```\n\n</details>\n\n<details>\n  <summary><b>Browser file upload form element</b> (click to show)</summary>\n\nData from file input elements can be processed using the same `FileReader` API\nas in the drag-and-drop example:\n\n```js\nvar rABS = true; // true: readAsBinaryString ; false: readAsArrayBuffer\nfunction handleFile(e) {\n  var files = e.target.files, f = files[0];\n  var reader = new FileReader();\n  reader.onload = function(e) {\n    var data = e.target.result;\n    if(!rABS) data = new Uint8Array(data);\n    var workbook = XLSX.read(data, {type: rABS ? 'binary' : 'array'});\n\n    /* DO SOMETHING WITH workbook HERE */\n  };\n  if(rABS) reader.readAsBinaryString(f); else reader.readAsArrayBuffer(f);\n}\ninput_dom_element.addEventListener('change', handleFile, false);\n```\n\n</details>\n\n\n### Parsing Examples\n\n- <http://oss.sheetjs.com/js-xlsx/> HTML5 File API / Base64 Text / Web Workers\n\nNote that older versions of IE do not support HTML5 File API, so the Base64 mode\nis used for testing.\n\n<details>\n  <summary><b>Get Base64 encoding on OSX / Windows</b> (click to show)</summary>\n\nOn OSX you can get the Base64 encoding with:\n\n```bash\n$ <target_file base64 | pbcopy\n```\n\nOn Windows XP and up you can get the Base64 encoding using `certutil`:\n\n```cmd\n> certutil -encode target_file target_file.b64\n```\n\n(note: You have to open the file and remove the header and footer lines)\n\n</details>\n\n- <http://oss.sheetjs.com/js-xlsx/ajax.html> XMLHttpRequest\n\n### Streaming Read\n\n<details>\n  <summary><b>Why is there no Streaming Read API?</b> (click to show)</summary>\n\nThe most common and interesting formats (XLS, XLSX/M, XLSB, ODS) are ultimately\nZIP or CFB containers of files.  Neither format puts the directory structure at\nthe beginning of the file: ZIP files place the Central Directory records at the\nend of the logical file, while CFB files can place the storage info anywhere in\nthe file! As a result, to properly handle these formats, a streaming function\nwould have to buffer the entire file before commencing.  That belies the\nexpectations of streaming, so we do not provide any streaming read API.\n\n</details>\n\nWhen dealing with Readable Streams, the easiest approach is to buffer the stream\nand process the whole thing at the end.  This can be done with a temporary file\nor by explicitly concatenating the stream:\n\n<details>\n  <summary><b>Explicitly concatenating streams</b> (click to show)</summary>\n\n```js\nvar fs = require('fs');\nvar XLSX = require('xlsx');\nfunction process_RS(stream/*:ReadStream*/, cb/*:(wb:Workbook)=>void*/)/*:void*/{\n  var buffers = [];\n  stream.on('data', function(data) { buffers.push(data); });\n  stream.on('end', function() {\n    var buffer = Buffer.concat(buffers);\n    var workbook = XLSX.read(buffer, {type:\"buffer\"});\n\n    /* DO SOMETHING WITH workbook IN THE CALLBACK */\n    cb(workbook);\n  });\n}\n```\n\nMore robust solutions are available using modules like `concat-stream`.\n\n</details>\n\n<details>\n  <summary><b>Writing to filesystem first</b> (click to show)</summary>\n\nThis example uses [`tempfile`](https://npm.im/tempfile) to generate file names:\n\n```js\nvar fs = require('fs'), tempfile = require('tempfile');\nvar XLSX = require('xlsx');\nfunction process_RS(stream/*:ReadStream*/, cb/*:(wb:Workbook)=>void*/)/*:void*/{\n  var fname = tempfile('.sheetjs');\n  console.log(fname);\n  var ostream = fs.createWriteStream(fname);\n  stream.pipe(ostream);\n  ostream.on('finish', function() {\n    var workbook = XLSX.readFile(fname);\n    fs.unlinkSync(fname);\n\n    /* DO SOMETHING WITH workbook IN THE CALLBACK */\n    cb(workbook);\n  });\n}\n```\n\n</details>\n\n## Working with the Workbook\n\nThe full object format is described later in this README.\n\n<details>\n  <summary><b>Reading a specific cell </b> (click to show)</summary>\n\nThis example extracts the value stored in cell A1 from the first worksheet:\n\n```js\nvar first_sheet_name = workbook.SheetNames[0];\nvar address_of_cell = 'A1';\n\n/* Get worksheet */\nvar worksheet = workbook.Sheets[first_sheet_name];\n\n/* Find desired cell */\nvar desired_cell = worksheet[address_of_cell];\n\n/* Get the value */\nvar desired_value = (desired_cell ? desired_cell.v : undefined);\n```\n\n</details>\n\n<details>\n  <summary><b>Adding a new worksheet to a workbook</b> (click to show)</summary>\n\nThis example uses [`XLSX.utils.aoa_to_sheet`](#array-of-arrays-input) to make a\nworksheet and appends the new worksheet to the workbook:\n\n```js\nvar new_ws_name = \"SheetJS\";\n\n/* make worksheet */\nvar ws_data = [\n  [ \"S\", \"h\", \"e\", \"e\", \"t\", \"J\", \"S\" ],\n  [  1 ,  2 ,  3 ,  4 ,  5 ]\n];\nvar ws = XLSX.utils.aoa_to_sheet(ws_data);\n\n/* Add the sheet name to the list */\nwb.SheetNames.push(ws_name);\n\n/* Load the worksheet object */\nwb.Sheets[ws_name] = ws;\n\n```\n\n</details>\n\n\n### Parsing and Writing Examples\n\n- <http://sheetjs.com/demos/modify.html> read + modify + write files\n\n- <https://github.com/SheetJS/js-xlsx/blob/master/bin/xlsx.njs> node\n\nThe node version installs a command line tool `xlsx` which can read spreadsheet\nfiles and output the contents in various formats.  The source is available at\n`xlsx.njs` in the bin directory.\n\nSome helper functions in `XLSX.utils` generate different views of the sheets:\n\n- `XLSX.utils.sheet_to_csv` generates CSV\n- `XLSX.utils.sheet_to_txt` generates UTF16 Formatted Text\n- `XLSX.utils.sheet_to_html` generates HTML\n- `XLSX.utils.sheet_to_json` generates an array of objects\n- `XLSX.utils.sheet_to_formulae` generates a list of formulae\n\n## Writing Workbooks\n\nFor writing, the first step is to generate output data.  The helper functions\n`write` and `writeFile` will produce the data in various formats suitable for\ndissemination.  The second step is to actual share the data with the end point.\nAssuming `workbook` is a workbook object:\n\n<details>\n  <summary><b>nodejs write a file</b> (click to show)</summary>\n\n`writeFile` is only available in server environments. Browsers have no API for\nwriting arbitrary files given a path, so another strategy must be used.\n\n```js\nif(typeof require !== 'undefined') XLSX = require('xlsx');\n/* output format determined by filename */\nXLSX.writeFile(workbook, 'out.xlsb');\n/* at this point, out.xlsb is a file that you can distribute */\n```\n\n</details>\n\n<details>\n  <summary><b>Browser add to web page</b> (click to show)</summary>\n\nThe `sheet_to_html` utility function generates HTML code that can be added to\nany DOM element.\n\n```js\nvar worksheet = workbook.Sheets[workbook.SheetNames[0]];\nvar container = document.getElementById('tableau');\ncontainer.innerHTML = XLSX.utils.sheet_to_html(worksheet);\n```\n\n\n</details>\n\n<details>\n  <summary><b>Browser save file</b> (click to show)</summary>\n\nNote: browser generates binary blob and forces a \"download\" to client.  This\nexample uses [FileSaver](https://github.com/eligrey/FileSaver.js/):\n\n```js\n/* bookType can be any supported output type */\nvar wopts = { bookType:'xlsx', bookSST:false, type:'array' };\n\nvar wbout = XLSX.write(workbook,wopts);\n\n/* the saveAs call downloads a file on the local machine */\nsaveAs(new Blob([wbout],{type:\"application/octet-stream\"}), \"test.xlsx\");\n```\n\n</details>\n\n<details>\n  <summary><b>Browser upload to server</b> (click to show)</summary>\n\nA complete example using XHR is [included in the XHR demo](demos/xhr/), along\nwith examples for fetch and wrapper libraries.  This example assumes the server\ncan handle Base64-encoded files (see the demo for a basic nodejs server):\n\n```js\n/* in this example, send a base64 string to the server */\nvar wopts = { bookType:'xlsx', bookSST:false, type:'base64' };\n\nvar wbout = XLSX.write(workbook,wopts);\n\nvar req = new XMLHttpRequest();\nreq.open(\"POST\", \"/upload\", true);\nvar formdata = new FormData();\nformdata.append('file', 'test.xlsx'); // <-- server expects `file` to hold name\nformdata.append('data', wbout); // <-- `data` holds the base64-encoded data\nreq.send(formdata);\n```\n\n</details>\n\n### Writing Examples\n\n- <http://sheetjs.com/demos/table.html> exporting an HTML table\n- <http://sheetjs.com/demos/writexlsx.html> generates a simple file\n\n### Streaming Write\n\nThe streaming write functions are available in the `XLSX.stream` object.  They\ntake the same arguments as the normal write functions but return a Readable\nStream.  They are only exposed in NodeJS.\n\n- `XLSX.stream.to_csv` is the streaming version of `XLSX.utils.sheet_to_csv`.\n- `XLSX.stream.to_html` is the streaming version of `XLSX.utils.sheet_to_html`.\n\n<details>\n  <summary><b>nodejs convert to CSV and write file</b> (click to show)</summary>\n\n```js\nvar output_file_name = \"out.csv\";\nvar stream = XLSX.stream.to_csv(worksheet);\nstream.pipe(fs.createWriteStream(output_file_name));\n```\n\n</details>\n\n<https://github.com/sheetjs/sheetaki> pipes write streams to nodejs response.\n\n## Interface\n\n`XLSX` is the exposed variable in the browser and the exported node variable\n\n`XLSX.version` is the version of the library (added by the build script).\n\n`XLSX.SSF` is an embedded version of the [format library](http://git.io/ssf).\n\n### Parsing functions\n\n`XLSX.read(data, read_opts)` attempts to parse `data`.\n\n`XLSX.readFile(filename, read_opts)` attempts to read `filename` and parse.\n\nParse options are described in the [Parsing Options](#parsing-options) section.\n\n### Writing functions\n\n`XLSX.write(wb, write_opts)` attempts to write the workbook `wb`\n\n`XLSX.writeFile(wb, filename, write_opts)` attempts to write `wb` to `filename`\n\n`XLSX.writeFileAsync(filename, wb, o, cb)` attempts to write `wb` to `filename`.\nIf `o` is omitted, the writer will use the third argument as the callback.\n\n`XLSX.stream` contains a set of streaming write functions.\n\nWrite options are described in the [Writing Options](#writing-options) section.\n\n### Utilities\n\nUtilities are available in the `XLSX.utils` object and are described in the\n[Utility Functions](#utility-functions) section:\n\n**Importing:**\n\n- `aoa_to_sheet` converts an array of arrays of JS data to a worksheet.\n- `json_to_sheet` converts an array of JS objects to a worksheet.\n- `table_to_sheet` converts a DOM TABLE element to a worksheet.\n- `sheet_add_aoa` adds an array of arrays of JS data to an existing worksheet.\n- `sheet_add_json` adds an array of JS objects to an existing worksheet.\n\n\n**Exporting:**\n\n- `sheet_to_json` converts a worksheet object to an array of JSON objects.\n- `sheet_to_csv` generates delimiter-separated-values output.\n- `sheet_to_txt` generates UTF16 formatted text.\n- `sheet_to_html` generates HTML output.\n- `sheet_to_formulae` generates a list of the formulae (with value fallbacks).\n\n\n**Cell and cell address manipulation:**\n\n- `format_cell` generates the text value for a cell (using number formats).\n- `encode_row / decode_row` converts between 0-indexed rows and 1-indexed rows.\n- `encode_col / decode_col` converts between 0-indexed columns and column names.\n- `encode_cell / decode_cell` converts cell addresses.\n- `encode_range / decode_range` converts cell ranges.\n\n## Common Spreadsheet Format\n\njs-xlsx conforms to the Common Spreadsheet Format (CSF):\n\n### General Structures\n\nCell address objects are stored as `{c:C, r:R}` where `C` and `R` are 0-indexed\ncolumn and row numbers, respectively.  For example, the cell address `B5` is\nrepresented by the object `{c:1, r:4}`.\n\nCell range objects are stored as `{s:S, e:E}` where `S` is the first cell and\n`E` is the last cell in the range.  The ranges are inclusive.  For example, the\nrange `A3:B7` is represented by the object `{s:{c:0, r:2}, e:{c:1, r:6}}`.\nUtility functions perform a row-major order walk traversal of a sheet range:\n\n```js\nfor(var R = range.s.r; R <= range.e.r; ++R) {\n  for(var C = range.s.c; C <= range.e.c; ++C) {\n    var cell_address = {c:C, r:R};\n    /* if an A1-style address is needed, encode the address */\n    var cell_ref = XLSX.utils.encode_cell(cell_address);\n  }\n}\n```\n\n### Cell Object\n\n| Key | Description                                                            |\n| --- | ---------------------------------------------------------------------- |\n| `v` | raw value (see Data Types section for more info)                       |\n| `w` | formatted text (if applicable)                                         |\n| `t` | cell type: `b` Boolean, `n` Number, `e` error, `s` String, `d` Date    |\n| `f` | cell formula encoded as an A1-style string (if applicable)             |\n| `F` | range of enclosing array if formula is array formula (if applicable)   |\n| `r` | rich text encoding (if applicable)                                     |\n| `h` | HTML rendering of the rich text (if applicable)                        |\n| `c` | comments associated with the cell                                      |\n| `z` | number format string associated with the cell (if requested)           |\n| `l` | cell hyperlink object (`.Target` holds link, `.Tooltip` is tooltip)    |\n| `s` | the style/theme of the cell (if applicable)                            |\n\nBuilt-in export utilities (such as the CSV exporter) will use the `w` text if it\nis available.  To change a value, be sure to delete `cell.w` (or set it to\n`undefined`) before attempting to export.  The utilities will regenerate the `w`\ntext from the number format (`cell.z`) and the raw value if possible.\n\nThe actual array formula is stored in the `f` field of the first cell in the\narray range.  Other cells in the range will omit the `f` field.\n\n#### Data Types\n\nThe raw value is stored in the `v` field, interpreted based on the `t` field.\n\nType `b` is the Boolean type.  `v` is interpreted according to JS truth tables.\n\nType `e` is the Error type. `v` holds the number and `w` holds the common name:\n\n<details>\n  <summary><b>Error values and interpretation</b> (click to show)</summary>\n\n|  Value | Error Meaning   |\n| -----: | :-------------- |\n| `0x00` | `#NULL!`        |\n| `0x07` | `#DIV/0!`       |\n| `0x0F` | `#VALUE!`       |\n| `0x17` | `#REF!`         |\n| `0x1D` | `#NAME?`        |\n| `0x24` | `#NUM!`         |\n| `0x2A` | `#N/A`          |\n| `0x2B` | `#GETTING_DATA` |\n\n</details>\n\nType `n` is the Number type. This includes all forms of data that Excel stores\nas numbers, such as dates/times and Boolean fields.  Excel exclusively uses data\nthat can be fit in an IEEE754 floating point number, just like JS Number, so the\n`v` field holds the raw number.  The `w` field holds formatted text.  Dates are\nstored as numbers by default and converted with `XLSX.SSF.parse_date_code`.\n\nType `d` is the Date type, generated only when the option `cellDates` is passed.\nSince JSON does not have a natural Date type, parsers are generally expected to\nstore ISO 8601 Date strings like you would get from `date.toISOString()`.  On\nthe other hand, writers and exporters should be able to handle date strings and\nJS Date objects.  Note that Excel disregards timezone modifiers and treats all\ndates in the local timezone.  js-xlsx does not correct for this error.\n\nType `s` is the String type.  `v` should be explicitly stored as a string to\navoid possible confusion.\n\nType `z` represents blank stub cells.  These do not have any data or type, and\nare not processed by any of the core library functions.  By default these cells\nwill not be generated; the parser `sheetStubs` option must be set to `true`.\n\n#### Dates\n\n<details>\n  <summary><b>Excel Date Code details</b> (click to show)</summary>\n\nBy default, Excel stores dates as numbers with a format code that specifies date\nprocessing.  For example, the date `19-Feb-17` is stored as the number `42785`\nwith a number format of `d-mmm-yy`.  The `SSF` module understands number formats\nand performs the appropriate conversion.\n\nXLSX also supports a special date type `d` where the data is an ISO 8601 date\nstring.  The formatter converts the date back to a number.\n\nThe default behavior for all parsers is to generate number cells.  Setting\n`cellDates` to true will force the generators to store dates.\n\n</details>\n\n<details>\n  <summary><b>Time Zones and Dates</b> (click to show)</summary>\n\nExcel has no native concept of universal time.  All times are specified in the\nlocal time zone.  Excel limitations prevent specifying true absolute dates.\n\nFollowing Excel, this library treats all dates as relative to local time zone.\n\n</details>\n\n<details>\n  <summary><b>Epochs: 1900 and 1904</b> (click to show)</summary>\n\nExcel supports two epochs (January 1 1900 and January 1 1904), see\n[\"1900 vs. 1904 Date System\" article](http://support2.microsoft.com/kb/180162).\nThe workbook's epoch can be determined by examining the workbook's\n`wb.Workbook.WBProps.date1904` property:\n\n```js\n!!(((wb.Workbook||{}).WBProps||{}).date1904)\n```\n\n</details>\n\n### Sheet Objects\n\nEach key that does not start with `!` maps to a cell (using `A-1` notation)\n\n`sheet[address]` returns the cell object for the specified address.\n\n**Special sheet keys (accessible as `sheet[key]`, each starting with `!`):**\n\n- `sheet['!ref']`: A-1 based range representing the sheet range. Functions that\n  work with sheets should use this parameter to determine the range.  Cells that\n  are assigned outside of the range are not processed.  In particular, when\n  writing a sheet by hand, cells outside of the range are not included\n\n  Functions that handle sheets should test for the presence of `!ref` field.\n  If the `!ref` is omitted or is not a valid range, functions are free to treat\n  the sheet as empty or attempt to guess the range.  The standard utilities that\n  ship with this library treat sheets as empty (for example, the CSV output is\n  empty string).\n\n  When reading a worksheet with the `sheetRows` property set, the ref parameter\n  will use the restricted range.  The original range is set at `ws['!fullref']`\n\n- `sheet['!margins']`: Object representing the page margins.  The default values\n  follow Excel's \"normal\" preset.  Excel also has a \"wide\" and a \"narrow\" preset\n  but they are stored as raw measurements. The main properties are listed below:\n\n<details>\n  <summary><b>Page margin details</b> (click to show)</summary>\n\n| key      | description            | \"normal\" | \"wide\" | \"narrow\" |\n|----------|------------------------|:---------|:-------|:-------- |\n| `left`   | left margin (inches)   | `0.7`    | `1.0`  | `0.25`   |\n| `right`  | right margin (inches)  | `0.7`    | `1.0`  | `0.25`   |\n| `top`    | top margin (inches)    | `0.75`   | `1.0`  | `0.75`   |\n| `bottom` | bottom margin (inches) | `0.75`   | `1.0`  | `0.75`   |\n| `header` | header margin (inches) | `0.3`    | `0.5`  | `0.3`    |\n| `footer` | footer margin (inches) | `0.3`    | `0.5`  | `0.3`    |\n\n```js\n/* Set worksheet sheet to \"normal\" */\nws[\"!margins\"]={left:0.7, right:0.7, top:0.75,bottom:0.75,header:0.3,footer:0.3}\n/* Set worksheet sheet to \"wide\" */\nws[\"!margins\"]={left:1.0, right:1.0, top:1.0, bottom:1.0, header:0.5,footer:0.5}\n/* Set worksheet sheet to \"narrow\" */\nws[\"!margins\"]={left:0.25,right:0.25,top:0.75,bottom:0.75,header:0.3,footer:0.3}\n```\n</details>\n\n#### Worksheet Object\n\nIn addition to the base sheet keys, worksheets also add:\n\n- `ws['!cols']`: array of column properties objects.  Column widths are actually\n  stored in files in a normalized manner, measured in terms of the \"Maximum\n  Digit Width\" (the largest width of the rendered digits 0-9, in pixels).  When\n  parsed, the column objects store the pixel width in the `wpx` field, character\n  width in the `wch` field, and the maximum digit width in the `MDW` field.\n\n- `ws['!rows']`: array of row properties objects as explained later in the docs.\n  Each row object encodes properties including row height and visibility.\n\n- `ws['!merges']`: array of range objects corresponding to the merged cells in\n  the worksheet.  Plain text formats do not support merge cells.  CSV export\n  will write all cells in the merge range if they exist, so be sure that only\n  the first cell (upper-left) in the range is set.\n\n- `ws['!protect']`: object of write sheet protection properties.  The `password`\n  key specifies the password for formats that support password-protected sheets\n  (XLSX/XLSB/XLS).  The writer uses the XOR obfuscation method.  The following\n  keys control the sheet protection -- set to `false` to enable a feature when\n  sheet is locked or set to `true` to disable a feature:\n\n<details>\n  <summary><b>Worksheet Protection Details</b> (click to show)</summary>\n\n| key                   | feature (true=disabled / false=enabled) | default    |\n|:----------------------|:----------------------------------------|:-----------|\n| `selectLockedCells`   | Select locked cells                     | enabled    |\n| `selectUnlockedCells` | Select unlocked cells                   | enabled    |\n| `formatCells`         | Format cells                            | disabled   |\n| `formatColumns`       | Format columns                          | disabled   |\n| `formatRows`          | Format rows                             | disabled   |\n| `insertColumns`       | Insert columns                          | disabled   |\n| `insertRows`          | Insert rows                             | disabled   |\n| `insertHyperlinks`    | Insert hyperlinks                       | disabled   |\n| `deleteColumns`       | Delete columns                          | disabled   |\n| `deleteRows`          | Delete rows                             | disabled   |\n| `sort`                | Sort                                    | disabled   |\n| `autoFilter`          | Filter                                  | disabled   |\n| `pivotTables`         | Use PivotTable reports                  | disabled   |\n| `objects`             | Edit objects                            | enabled    |\n| `scenarios`           | Edit scenarios                          | enabled    |\n</details>\n\n- `ws['!autofilter']`: AutoFilter object following the schema:\n\n```typescript\ntype AutoFilter = {\n  ref:string; // A-1 based range representing the AutoFilter table range\n}\n```\n\n#### Chartsheet Object\n\nChartsheets are represented as standard sheets.  They are distinguished with the\n`!type` property set to `\"chart\"`.\n\nThe underlying data and `!ref` refer to the cached data in the chartsheet.  The\nfirst row of the chartsheet is the underlying header.\n\n#### Macrosheet Object\n\nMacrosheets are represented as standard sheets.  They are distinguished with the\n`!type` property set to `\"macro\"`.\n\n#### Dialogsheet Object\n\nDialogsheets are represented as standard sheets. They are distinguished with the\n`!type` property set to `\"dialog\"`.\n\n### Workbook Object\n\n`workbook.SheetNames` is an ordered list of the sheets in the workbook\n\n`wb.Sheets[sheetname]` returns an object representing the worksheet.\n\n`wb.Props` is an object storing the standard properties.  `wb.Custprops` stores\ncustom properties.  Since the XLS standard properties deviate from the XLSX\nstandard, XLS parsing stores core properties in both places.\n\n`wb.Workbook` stores [workbook-level attributes](#workbook-level-attributes).\n\n#### Workbook File Properties\n\nThe various file formats use different internal names for file properties.  The\nworkbook `Props` object normalizes the names:\n\n<details>\n  <summary><b>File Properties</b> (click to show)</summary>\n\n| JS Name       | Excel Description              |\n|:--------------|:-------------------------------|\n| `Title`       | Summary tab \"Title\"            |\n| `Subject`     | Summary tab \"Subject\"          |\n| `Author`      | Summary tab \"Author\"           |\n| `Manager`     | Summary tab \"Manager\"          |\n| `Company`     | Summary tab \"Company\"          |\n| `Category`    | Summary tab \"Category\"         |\n| `Keywords`    | Summary tab \"Keywords\"         |\n| `Comments`    | Summary tab \"Comments\"         |\n| `LastAuthor`  | Statistics tab \"Last saved by\" |\n| `CreatedDate` | Statistics tab \"Created\"       |\n\n</details>\n\nFor example, to set the workbook title property:\n\n```js\nif(!wb.Props) wb.Props = {};\nwb.Props.Title = \"Insert Title Here\";\n```\n\nCustom properties are added in the workbook `Custprops` object:\n\n```js\nif(!wb.Custprops) wb.Custprops = {};\nwb.Custprops[\"Custom Property\"] = \"Custom Value\";\n```\n\nWriters will process the `Props` key of the options object:\n\n```js\n/* force the Author to be \"SheetJS\" */\nXLSX.write(wb, {Props:{Author:\"SheetJS\"}});\n```\n\n### Workbook-Level Attributes\n\n`wb.Workbook` stores workbook-level attributes.\n\n#### Defined Names\n\n`wb.Workbook.Names` is an array of defined name objects which have the keys:\n\n<details>\n  <summary><b>Defined Name Properties</b> (click to show)</summary>\n\n| Key       | Description                                                      |\n|:----------|:-----------------------------------------------------------------|\n| `Sheet`   | Name scope.  Sheet Index (0 = first sheet) or `null` (Workbook)  |\n| `Name`    | Case-sensitive name.  Standard rules apply **                    |\n| `Ref`     | A1-style Reference (`\"Sheet1!$A$1:$D$20\"`)                       |\n| `Comment` | Comment (only applicable for XLS/XLSX/XLSB)                      |\n\n</details>\n\nExcel allows two sheet-scoped defined names to share the same name.  However, a\nsheet-scoped name cannot collide with a workbook-scope name.  Workbook writers\nmay not enforce this constraint.\n\n#### Workbook Views\n\n`wb.Workbook.Views` is an array of workbook view objects which have the keys:\n\n| Key             | Description                                         |\n|:----------------|:----------------------------------------------------|\n| `RTL`           | If true, display right-to-left                      |\n\n#### Miscellaneous Workbook Properties\n\n`wb.Workbook.WBProps` holds other workbook properties:\n\n| Key             | Description                                         |\n|:----------------|:----------------------------------------------------|\n| `CodeName`      | [VBA Project Workbook Code Name](#vba-and-macros)   |\n| `date1904`      | epoch: 0/false for 1900 system, 1/true for 1904     |\n| `filterPrivacy` | Warn or strip personally identifying info on save   |\n\n### Document Features\n\nEven for basic features like date storage, the official Excel formats store the\nsame content in different ways.  The parsers are expected to convert from the\nunderlying file format representation to the Common Spreadsheet Format.  Writers\nare expected to convert from CSF back to the underlying file format.\n\n#### Formulae\n\nThe A1-style formula string is stored in the `f` field.  Even though different\nfile formats store the formulae in different ways, the formats are translated.\nEven though some formats store formulae with a leading equal sign, CSF formulae\ndo not start with `=`.\n\n<details>\n  <summary><b>Representation of A1=1, A2=2, A3=A1+A2</b> (click to show)</summary>\n\n```js\n{\n  \"!ref\": \"A1:A3\",\n  A1: { t:'n', v:1 },\n  A2: { t:'n', v:2 },\n  A3: { t:'n', v:3, f:'A1+A2' }\n}\n```\n</details>\n\nShared formulae are decompressed and each cell has the formula corresponding to\nits cell.  Writers generally do not attempt to generate shared formulae.\n\nCells with formula entries but no value will be serialized in a way that Excel\nand other spreadsheet tools will recognize.  This library will not automatically\ncompute formula results!  For example, to compute `BESSELJ` in a worksheet:\n\n<details>\n  <summary><b>Formula without known value</b> (click to show)</summary>\n\n```js\n{\n  \"!ref\": \"A1:A3\",\n  A1: { t:'n', v:3.14159 },\n  A2: { t:'n', v:2 },\n  A3: { t:'n', f:'BESSELJ(A1,A2)' }\n}\n```\n</details>\n\n**Array Formulae**\n\nArray formulae are stored in the top-left cell of the array block.  All cells\nof an array formula have a `F` field corresponding to the range.  A single-cell\nformula can be distinguished from a plain formula by the presence of `F` field.\n\n<details>\n  <summary><b>Array Formula examples</b> (click to show)</summary>\n\nFor example, setting the cell `C1` to the array formula `{=SUM(A1:A3*B1:B3)}`:\n\n```js\nworksheet['C1'] = { t:'n', f: \"SUM(A1:A3*B1:B3)\", F:\"C1:C1\" };\n```\n\nFor a multi-cell array formula, every cell has the same array range but only the\nfirst cell specifies the formula.  Consider `D1:D3=A1:A3*B1:B3`:\n\n```js\nworksheet['D1'] = { t:'n', F:\"D1:D3\", f:\"A1:A3*B1:B3\" };\nworksheet['D2'] = { t:'n', F:\"D1:D3\" };\nworksheet['D3'] = { t:'n', F:\"D1:D3\" };\n```\n\n</details>\n\nUtilities and writers are expected to check for the presence of a `F` field and\nignore any possible formula element `f` in cells other than the starting cell.\nThey are not expected to perform validation of the formulae!\n\n<details>\n  <summary><b>Formula Output Utility Function</b> (click to show)</summary>\n\nThe `sheet_to_formulae` method generates one line per formula or array formula.\nArray formulae are rendered in the form `range=formula` while plain cells are\nrendered in the form `cell=formula or value`.  Note that string literals are\nprefixed with an apostrophe `'`, consistent with Excel's formula bar display.\n</details>\n\n<details>\n  <summary><b>Formulae File Format Details</b> (click to show)</summary>\n\n| Storage Representation | Formats                  | Read  | Write |\n|:-----------------------|:-------------------------|:-----:|:-----:|\n| A1-style strings       | XLSX                     |  :o:  |  :o:  |\n| RC-style strings       | XLML and plain text      |  :o:  |  :o:  |\n| BIFF Parsed formulae   | XLSB and all XLS formats |  :o:  |       |\n| OpenFormula formulae   | ODS/FODS/UOS             |  :o:  |  :o:  |\n\nSince Excel prohibits named cells from colliding with names of A1 or RC style\ncell references, a (not-so-simple) regex conversion is possible.  BIFF Parsed\nformulae have to be explicitly unwound.  OpenFormula formulae can be converted\nwith regular expressions.\n</details>\n\n#### Column Properties\n\nThe `!cols` array in each worksheet, if present, is a collection of `ColInfo`\nobjects which have the following properties:\n\n```typescript\ntype ColInfo = {\n  /* visibility */\n  hidden?: boolean; // if true, the column is hidden\n\n  /* column width is specified in one of the following ways: */\n  wpx?:    number;  // width in screen pixels\n  width?:  number;  // width in Excel's \"Max Digit Width\", width*256 is integral\n  wch?:    number;  // width in characters\n\n  /* other fields for preserving features from files */\n  MDW?:    number;  // Excel's \"Max Digit Width\" unit, always integral\n};\n```\n\n<details>\n  <summary><b>Why are there three width types?</b> (click to show)</summary>\n\nThere are three different width types corresponding to the three different ways\nspreadsheets store column widths:\n\nSYLK and other plain text formats use raw character count. Contemporaneous tools\nlike Visicalc and Multiplan were character based.  Since the characters had the\nsame width, it sufficed to store a count.  This tradition was continued into the\nBIFF formats.\n\nSpreadsheetML (2003) tried to align with HTML by standardizing on screen pixel\ncount throughout the file.  Column widths, row heights, and other measures use\npixels.  When the pixel and character counts do not align, Excel rounds values.\n\nXLSX internally stores column widths in a nebulous \"Max Digit Width\" form.  The\nMax Digit Width is the width of the largest digit when rendered (generally the\n\"0\" character is the widest).  The internal width must be an integer multiple of\nthe the width divided by 256.  ECMA-376 describes a formula for converting\nbetween pixels and the internal width.  This represents a hybrid approach.\n\nRead functions attempt to populate all three properties.  Write functions will\ntry to cycle specified values to the desired type.  In order to avoid potential\nconflicts, manipulation should delete the other properties first.  For example,\nwhen changing the pixel width, delete the `wch` and `width` properties.\n</details>\n\n<details>\n  <summary><b>Implementation details</b> (click to show)</summary>\n\nGiven the constraints, it is possible to determine the MDW without actually\ninspecting the font!  The parsers guess the pixel width by converting from width\nto pixels and back, repeating for all possible MDW and selecting the MDW that\nminimizes the error.  XLML actually stores the pixel width, so the guess works\nin the opposite direction.\n\nEven though all of the information is made available, writers are expected to\nfollow the priority order:\n\n1) use `width` field if available\n2) use `wpx` pixel width if available\n3) use `wch` character count if available\n</details>\n\n#### Row Properties\n\nThe `!rows` array in each worksheet, if present, is a collection of `RowInfo`\nobjects which have the following properties:\n\n```typescript\ntype RowInfo = {\n  /* visibility */\n  hidden?: boolean; // if true, the row is hidden\n\n  /* row height is specified in one of the following ways: */\n  hpx?:    number;  // height in screen pixels\n  hpt?:    number;  // height in points\n\n  level?:  number;  // 0-indexed outline / group level\n};\n```\n\nNote: Excel UI displays the base outline level as `1` and the max level as `8`.\nThe `level` field stores the base outline as `0` and the max level as `7`.\n\n<details>\n  <summary><b>Implementation details</b> (click to show)</summary>\n\nExcel internally stores row heights in points.  The default resolution is 72 DPI\nor 96 PPI, so the pixel and point size should agree.  For different resolutions\nthey may not agree, so the library separates the concepts.\n\nEven though all of the information is made available, writers are expected to\nfollow the priority order:\n\n1) use `hpx` pixel height if available\n2) use `hpt` point height if available\n</details>\n\n#### Number Formats\n\nThe `cell.w` formatted text for each cell is produced from `cell.v` and `cell.z`\nformat.  If the format is not specified, the Excel `General` format is used.\nThe format can either be specified as a string or as an index into the format\ntable.  Parsers are expected to populate `workbook.SSF` with the number format\ntable.  Writers are expected to serialize the table.\n\nCustom tools should ensure that the local table has each used format string\nsomewhere in the table.  Excel convention mandates that the custom formats start\nat index 164.  The following example creates a custom format from scratch:\n\n<details>\n  <summary><b>New worksheet with custom format</b> (click to show)</summary>\n\n```js\nvar wb = {\n  SheetNames: [\"Sheet1\"],\n  Sheets: {\n    Sheet1: {\n      \"!ref\":\"A1:C1\",\n      A1: { t:\"n\", v:10000 },                    // <-- General format\n      B1: { t:\"n\", v:10000, z: \"0%\" },           // <-- Builtin format\n      C1: { t:\"n\", v:10000, z: \"\\\"T\\\"\\ #0.00\" }  // <-- Custom format\n    }\n  }\n}\n```\n</details>\n\nThe rules are slightly different from how Excel displays custom number formats.\nIn particular, literal characters must be wrapped in double quotes or preceded\nby a backslash. For more info, see the Excel documentation article\n`Create or delete a custom number format` or ECMA-376 18.8.31 (Number Formats)\n\n\n<details>\n  <summary><b>Default Number Formats</b> (click to show)</summary>\n\nThe default formats are listed in ECMA-376 18.8.30:\n\n| ID | Format                     |\n|---:|:---------------------------|\n|  0 | `General`                  |\n|  1 | `0`                        |\n|  2 | `0.00`                     |\n|  3 | `#,##0`                    |\n|  4 | `#,##0.00`                 |\n|  9 | `0%`                       |\n| 10 | `0.00%`                    |\n| 11 | `0.00E+00`                 |\n| 12 | `# ?/?`                    |\n| 13 | `# ??/??`                  |\n| 14 | `m/d/yy` (see below)       |\n| 15 | `d-mmm-yy`                 |\n| 16 | `d-mmm`                    |\n| 17 | `mmm-yy`                   |\n| 18 | `h:mm AM/PM`               |\n| 19 | `h:mm:ss AM/PM`            |\n| 20 | `h:mm`                     |\n| 21 | `h:mm:ss`                  |\n| 22 | `m/d/yy h:mm`              |\n| 37 | `#,##0 ;(#,##0)`           |\n| 38 | `#,##0 ;[Red](#,##0)`      |\n| 39 | `#,##0.00;(#,##0.00)`      |\n| 40 | `#,##0.00;[Red](#,##0.00)` |\n| 45 | `mm:ss`                    |\n| 46 | `[h]:mm:ss`                |\n| 47 | `mmss.0`                   |\n| 48 | `##0.0E+0`                 |\n| 49 | `@`                        |\n\n</details>\n\nFormat 14 (`m/d/yy`) is localized by Excel: even though the file specifies that\nnumber format, it will be drawn differently based on system settings.  It makes\nsense when the producer and consumer of files are in the same locale, but that\nis not always the case over the Internet.  To get around this ambiguity, parse\nfunctions accept the `dateNF` option to override the interpretation of that\nspecific format string.\n\n#### Hyperlinks\n\nHyperlinks are stored in the `l` key of cell objects.  The `Target` field of the\nhyperlink object is the target of the link, including the URI fragment. Tooltips\nare stored in the `Tooltip` field and are displayed when you move your mouse\nover the text.\n\nFor example, the following snippet creates a link from cell `A3` to\n<http://sheetjs.com> with the tip `\"Find us @ SheetJS.com!\"`:\n\n```js\nws['A3'].l = { Target:\"http://sheetjs.com\", Tooltip:\"Find us @ SheetJS.com!\" };\n```\n\nNote that Excel does not automatically style hyperlinks -- they will generally\nbe displayed as normal text.\n\nLinks where the target is a cell or range or defined name in the same workbook\n(\"Internal Links\") are marked with a leading hash character:\n\n```js\nws['A2'].l = { Target:\"#E2\" }; /* link to cell E2 */\n```\n\n#### Cell Comments\n\nCell comments are objects stored in the `c` array of cell objects.  The actual\ncontents of the comment are split into blocks based on the comment author.  The\n`a` field of each comment object is the author of the comment and the `t` field\nis the plain text representation.\n\nFor example, the following snippet appends a cell comment into cell `A1`:\n\n```js\nif(!ws.A1.c) ws.A1.c = [];\nws.A1.c.push({a:\"SheetJS\", t:\"I'm a little comment, short and stout!\"});\n```\n\nNote: XLSB enforces a 54 character limit on the Author name.  Names longer than\n54 characters may cause issues with other formats.\n\n#### Sheet Visibility\n\nExcel enables hiding sheets in the lower tab bar.  The sheet data is stored in\nthe file but the UI does not readily make it available.  Standard hidden sheets\nare revealed in the \"Unhide\" menu.  Excel also has \"very hidden\" sheets which\ncannot be revealed in the menu.  It is only accessible in the VB Editor!\n\nThe visibility setting is stored in the `Hidden` property of sheet props array.\n\n<details>\n  <summary><b>More details</b> (click to show)</summary>\n\n| Value | Definition  |\n|:-----:|:------------|\n|   0   | Visible     |\n|   1   | Hidden      |\n|   2   | Very Hidden |\n\nWith <https://rawgit.com/SheetJS/test_files/master/sheet_visibility.xlsx>:\n\n```js\n> wb.Workbook.Sheets.map(function(x) { return [x.name, x.Hidden] })\n[ [ 'Visible', 0 ], [ 'Hidden', 1 ], [ 'VeryHidden', 2 ] ]\n```\n\nNon-Excel formats do not support the Very Hidden state.  The best way to test\nif a sheet is visible is to check if the `Hidden` property is logical truth:\n\n```js\n> wb.Workbook.Sheets.map(function(x) { return [x.name, !x.Hidden] })\n[ [ 'Visible', true ], [ 'Hidden', false ], [ 'VeryHidden', false ] ]\n```\n</details>\n\n#### VBA and Macros\n\nVBA Macros are stored in a special data blob that is exposed in the `vbaraw`\nproperty of the workbook object when the `bookVBA` option is `true`.  They are\nsupported in `XLSM`, `XLSB`, and `BIFF8 XLS` formats.  The supported format\nwriters automatically insert the data blobs if it is present in the workbook and\nassociate with the worksheet names.\n\n<details>\n\t<summary><b>Custom Code Names</b> (click to show)</summary>\n\nThe workbook code name is stored in `wb.Workbook.WBProps.CodeName`.  By default,\nExcel will write `ThisWorkbook` or a translated phrase like `DieseArbeitsmappe`.\nWorksheet and Chartsheet code names are in the worksheet properties object at\n`wb.Workbook.Sheets[i].CodeName`.  Macrosheets and Dialogsheets are ignored.\n\nThe readers and writers preserve the code names, but they have to be manually\nset when adding a VBA blob to a different workbook.\n\n</details>\n\n<details>\n\t<summary><b>Macrosheets</b> (click to show)</summary>\n\nOlder versions of Excel also supported a non-VBA \"macrosheet\" sheet type that\nstored automation commands.  These are exposed in objects with the `!type`\nproperty set to `\"macro\"`.\n\n</details>\n\n<details>\n\t<summary><b>Detecting macros in workbooks</b> (click to show)</summary>\n\nThe `vbaraw` field will only be set if macros are present, so testing is simple:\n\n```js\nfunction wb_has_macro(wb/*:workbook*/)/*:boolean*/ {\n\tif(!!wb.vbaraw) return true;\n\tconst sheets = wb.SheetNames.map((n) => wb.Sheets[n]);\n\treturn sheets.some((ws) => !!ws && ws['!type']=='macro');\n}\n```\n\n</details>\n\n## Parsing Options\n\nThe exported `read` and `readFile` functions accept an options argument:\n\n| Option Name | Default | Description                                          |\n| :---------- | ------: | :--------------------------------------------------- |\n|`type`       |         | Input data encoding (see Input Type below)           |\n|`raw`        | false   | If true, plain text parsing will not parse values ** |\n|`codepage`   |         | If specified, use code page when appropriate **      |\n|`cellFormula`| true    | Save formulae to the .f field                        |\n|`cellHTML`   | true    | Parse rich text and save HTML to the `.h` field      |\n|`cellNF`     | false   | Save number format string to the `.z` field          |\n|`cellStyles` | false   | Save style/theme info to the `.s` field              |\n|`cellText`   | true    | Generated formatted text to the `.w` field           |\n|`cellDates`  | false   | Store dates as type `d` (default is `n`)             |\n|`dateNF`     |         | If specified, use the string for date code 14 **     |\n|`sheetStubs` | false   | Create cell objects of type `z` for stub cells       |\n|`sheetRows`  | 0       | If >0, read the first `sheetRows` rows **            |\n|`bookDeps`   | false   | If true, parse calculation chains                    |\n|`bookFiles`  | false   | If true, add raw files to book object **             |\n|`bookProps`  | false   | If true, only parse enough to get book metadata **   |\n|`bookSheets` | false   | If true, only parse enough to get the sheet names    |\n|`bookVBA`    | false   | If true, copy VBA blob to `vbaraw` field **          |\n|`password`   | \"\"      | If defined and file is encrypted, use password **    |\n|`WTF`        | false   | If true, throw errors on unexpected file features ** |\n\n- Even if `cellNF` is false, formatted text will be generated and saved to `.w`\n- In some cases, sheets may be parsed even if `bookSheets` is false.\n- Excel aggressively tries to interpret values from CSV and other plain text.\n  This leads to surprising behavior! The `raw` option suppresses value parsing.\n- `bookSheets` and `bookProps` combine to give both sets of information\n- `Deps` will be an empty object if `bookDeps` is false\n- `bookFiles` behavior depends on file type:\n    * `keys` array (paths in the ZIP) for ZIP-based formats\n    * `files` hash (mapping paths to objects representing the files) for ZIP\n    * `cfb` object for formats using CFB containers\n- `sheetRows-1` rows will be generated when looking at the JSON object output\n  (since the header row is counted as a row when parsing the data)\n- `bookVBA` merely exposes the raw VBA CFB object.  It does not parse the data.\n  XLSM and XLSB store the VBA CFB object in `xl/vbaProject.bin`. BIFF8 XLS mixes\n  the VBA entries alongside the core Workbook entry, so the library generates a\n  new XLSB-compatible blob from the XLS CFB container.\n- `codepage` is applied to BIFF2 - BIFF5 files without `CodePage` records and to\n  CSV files without BOM in `type:\"binary\"`.  BIFF8 XLS always defaults to 1200.\n- Currently only XOR encryption is supported.  Unsupported error will be thrown\n  for files employing other encryption methods.\n- WTF is mainly for development.  By default, the parser will suppress read\n  errors on single worksheets, allowing you to read from the worksheets that do\n  parse properly. Setting `WTF:1` forces those errors to be thrown.\n\n### Input Type\n\nStrings can be interpreted in multiple ways.  The `type` parameter for `read`\ntells the library how to parse the data argument:\n\n| `type`     | expected input                                                  |\n|------------|-----------------------------------------------------------------|\n| `\"base64\"` | string: Base64 encoding of the file                             |\n| `\"binary\"` | string: binary string (byte `n` is `data.charCodeAt(n)`)        |\n| `\"string\"` | string: JS string (characters interpreted as UTF8)              |\n| `\"buffer\"` | nodejs Buffer                                                   |\n| `\"array\"`  | array: array of 8-bit unsigned int (byte `n` is `data[n]`)      |\n| `\"file\"`   | string: path of file that will be read (nodejs only)            |\n\n### Guessing File Type\n\n<details>\n  <summary><b>Implementation Details</b> (click to show)</summary>\n\nExcel and other spreadsheet tools read the first few bytes and apply other\nheuristics to determine a file type.  This enables file type punning: renaming\nfiles with the `.xls` extension will tell your computer to use Excel to open the\nfile but Excel will know how to handle it.  This library applies similar logic:\n\n| Byte 0 | Raw File Type | Spreadsheet Types                                   |\n|:-------|:--------------|:----------------------------------------------------|\n| `0xD0` | CFB Container | BIFF 5/8 or password-protected XLSX/XLSB or WQ3/QPW |\n| `0x09` | BIFF Stream   | BIFF 2/3/4/5                                        |\n| `0x3C` | XML/HTML      | SpreadsheetML / Flat ODS / UOS1 / HTML / plain text |\n| `0x50` | ZIP Archive   | XLSB or XLSX/M or ODS or UOS2 or plain text         |\n| `0x49` | Plain Text    | SYLK or plain text                                  |\n| `0x54` | Plain Text    | DIF or plain text                                   |\n| `0xEF` | UTF8 Encoded  | SpreadsheetML / Flat ODS / UOS1 / HTML / plain text |\n| `0xFF` | UTF16 Encoded | SpreadsheetML / Flat ODS / UOS1 / HTML / plain text |\n| `0x00` | Record Stream | Lotus WK\\* or Quattro Pro or plain text             |\n| `0x7B` | Plain text    | RTF or plain text                                   |\n| `0x0A` | Plain text    | SpreadsheetML / Flat ODS / UOS1 / HTML / plain text |\n| `0x0D` | Plain text    | SpreadsheetML / Flat ODS / UOS1 / HTML / plain text |\n| `0x20` | Plain text    | SpreadsheetML / Flat ODS / UOS1 / HTML / plain text |\n\nDBF files are detected based on the first byte as well as the third and fourth\nbytes (corresponding to month and day of the file date)\n\nPlain text format guessing follows the priority order:\n\n| Format | Test                                                                |\n|:-------|:--------------------------------------------------------------------|\n| XML    | `<?xml` appears in the first 1024 characters                        |\n| HTML   | starts with `<` and HTML tags appear in the first 1024 characters * |\n| XML    | starts with `<`                                                     |\n| RTF    | starts with `{\\rt`                                                  |\n| DSV    | starts with `/sep=.$/`, separator is the specified character        |\n| DSV    | more unquoted `\";\"` chars than `\"\\t\"` or `\",\"` in the first 1024    |\n| TSV    | more unquoted `\"\\t\"` chars than `\",\"` chars in the first 1024       |\n| CSV    | one of the first 1024 characters is a comma `\",\"`                   |\n| ETH    | starts with `socialcalc:version:`                                   |\n| PRN    | (default)                                                           |\n\n- HTML tags include: `html`, `table`, `head`, `meta`, `script`, `style`, `div`\n\n</details>\n\n<details>\n  <summary><b>Why are random text files valid?</b> (click to show)</summary>\n\nExcel is extremely aggressive in reading files.  Adding an XLS extension to any\ndisplay text file  (where the only characters are ANSI display chars) tricks\nExcel into thinking that the file is potentially a CSV or TSV file, even if it\nis only one column!  This library attempts to replicate that behavior.\n\nThe best approach is to validate the desired worksheet and ensure it has the\nexpected number of rows or columns.  Extracting the range is extremely simple:\n\n```js\nvar range = XLSX.utils.decode_range(worksheet['!ref']);\nvar ncols = range.e.c - range.r.c + 1, nrows = range.e.r - range.s.r + 1;\n```\n\n</details>\n\n## Writing Options\n\nThe exported `write` and `writeFile` functions accept an options argument:\n\n| Option Name |  Default | Description                                         |\n| :---------- | -------: | :-------------------------------------------------- |\n|`type`       |          | Output data encoding (see Output Type below)        |\n|`cellDates`  |  `false` | Store dates as type `d` (default is `n`)            |\n|`bookSST`    |  `false` | Generate Shared String Table **                     |\n|`bookType`   | `\"xlsx\"` | Type of Workbook (see below for supported formats)  |\n|`sheet`      |     `\"\"` | Name of Worksheet for single-sheet formats **       |\n|`compression`|  `false` | Use ZIP compression for ZIP-based formats **        |\n|`Props`      |          | Override workbook properties when writing **        |\n|`themeXLSX`  |          | Override theme XML when writing XLSX/XLSB/XLSM **   |\n\n- `bookSST` is slower and more memory intensive, but has better compatibility\n  with older versions of iOS Numbers\n- The raw data is the only thing guaranteed to be saved.  Features not described\n  in this README may not be serialized.\n- `cellDates` only applies to XLSX output and is not guaranteed to work with\n  third-party readers.  Excel itself does not usually write cells with type `d`\n  so non-Excel tools may ignore the data or error in the presence of dates.\n- `Props` is an object mirroring the workbook `Props` field.  See the table from\n  the [Workbook File Properties](#workbook-file-properties) section.\n- if specified, the string from `themeXLSX` will be saved as the primary theme\n  for XLSX/XLSB/XLSM files (to `xl/theme/theme1.xml` in the ZIP)\n\n### Supported Output Formats\n\nFor broad compatibility with third-party tools, this library supports many\noutput formats.  The specific file type is controlled with `bookType` option:\n\n| `bookType` | file ext | container | sheets | Description                     |\n| :--------- | -------: | :-------: | :----- |:------------------------------- |\n| `xlsx`     | `.xlsx`  |    ZIP    | multi  | Excel 2007+ XML Format          |\n| `xlsm`     | `.xlsm`  |    ZIP    | multi  | Excel 2007+ Macro XML Format    |\n| `xlsb`     | `.xlsb`  |    ZIP    | multi  | Excel 2007+ Binary Format       |\n| `biff8`    | `.xls`   |    CFB    | multi  | Excel 97-2004 Workbook Format   |\n| `biff5`    | `.xls`   |    CFB    | multi  | Excel 5.0/95 Workbook Format    |\n| `biff2`    | `.xls`   |   none    | single | Excel 2.0 Worksheet Format      |\n| `xlml`     | `.xls`   |   none    | multi  | Excel 2003-2004 (SpreadsheetML) |\n| `ods`      | `.ods`   |    ZIP    | multi  | OpenDocument Spreadsheet        |\n| `fods`     | `.fods`  |   none    | multi  | Flat OpenDocument Spreadsheet   |\n| `csv`      | `.csv`   |   none    | single | Comma Separated Values          |\n| `txt`      | `.txt`   |   none    | single | UTF-16 Unicode Text (TXT)       |\n| `sylk`     | `.sylk`  |   none    | single | Symbolic Link (SYLK)            |\n| `html`     | `.html`  |   none    | single | HTML Document                   |\n| `dif`      | `.dif`   |   none    | single | Data Interchange Format (DIF)   |\n| `dbf`      | `.dbf`   |   none    | single | dBASE II + VFP Extensions (DBF) |\n| `rtf`      | `.rtf`   |   none    | single | Rich Text Format (RTF)          |\n| `prn`      | `.prn`   |   none    | single | Lotus Formatted Text            |\n| `eth`      | `.eth`   |   none    | single | Ethercalc Record Format (ETH)   |\n\n- `compression` only applies to formats with ZI","readmeFilename":"README.md"}