{"_id":"@akashaki/excel-stream","name":"@akashaki/excel-stream","dist-tags":{"latest":"1.1.2"},"versions":{"1.1.2":{"name":"@akashaki/excel-stream","description":"convert a stream of xls or xlsx into json on the command line or in node","version":"1.1.2","bin":{"excel-stream":"index.js"},"homepage":"https://github.com/dominictarr/excel-stream","repository":{"type":"git","url":"git://github.com/dominictarr/excel-stream.git"},"dependencies":{"JSONStream":"^1.0.4","concat-stream":"^1.4.6","csv-stream":"0.2.0","duplexer":"~0.1.1","j":"^0.4.3","minimist":"^1.1.1","osenv":"^0.1.3","through":"~2.3.4","win-spawn":"^2.0.0"},"devDependencies":{},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","_id":"@akashaki/excel-stream@1.1.2","gitHead":"2843d7c4829815b099208c4a7d3b1db3e9086594","bugs":{"url":"https://github.com/dominictarr/excel-stream/issues"},"_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-EztJ/l5NaHjHiEiSfZZRa0Klm7Q0tyCQVE3cAhgDMwX5F3ynT255c5yw7Rp1zjFTxF9wuuoviNyFwapFlGdKKA==","shasum":"97cbcc874115504e4dec5dc5268c48136a8afa02","tarball":"https://registry.npmjs.org/@akashaki/excel-stream/-/excel-stream-1.1.2.tgz","fileCount":4,"unpackedSize":5529,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBwLI966jMzbdaid8DKXLlcpWtiN5dRS63q5J01Dnp9AAiB8FYr4V4UjUVSgL45QWhb2b5PaMiHTdGL5NRY6R+hIBA=="}]},"_npmUser":{"name":"akashaki","email":"akash.chatterjee44@gmail.com"},"directories":{},"maintainers":[{"name":"akashaki","email":"akash.chatterjee44@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/excel-stream_1.1.2_1707855242685_0.20597657623943122"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-13T20:14:02.476Z","1.1.2":"2024-02-13T20:14:02.821Z","modified":"2024-02-13T20:14:03.146Z"},"maintainers":[{"name":"akashaki","email":"akash.chatterjee44@gmail.com"}],"description":"convert a stream of xls or xlsx into json on the command line or in node","homepage":"https://github.com/dominictarr/excel-stream","repository":{"type":"git","url":"git://github.com/dominictarr/excel-stream.git"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"bugs":{"url":"https://github.com/dominictarr/excel-stream/issues"},"license":"MIT","readme":"# excel-stream\r\n\r\nA stream that converts excel spreadsheets into JSON object arrays.\r\n\r\n\r\n# Examples\r\n\r\n``` js\r\n// stream rows from the first sheet on the file\r\nvar excel = require('excel-stream')\r\nvar fs = require('fs')\r\n\r\nfs.createReadStream('accounts.xlsx')\r\n  .pipe(excel())  // same as excel({sheetIndex: 0})\r\n  .on('data', console.log)\r\n\r\n```\r\n\r\n``` js\r\n// stream rows from the sheet named 'Your sheet name'\r\nvar excel = require('excel-stream')\r\nvar fs = require('fs')\r\n\r\nfs.createReadStream('accounts.xlsx')\r\n  .pipe(excel({\r\n     sheet: 'Your sheet name'\r\n  }))\r\n  .on('data', console.log)\r\n\r\n```\r\n\r\n# stream options\r\n\r\nThe `options` object may have the same properties as [csv-stream](https://www.npmjs.com/package/csv-stream) and these two additional properties:\r\n\r\n * `sheet`: the name of the sheet you want to stream. Case sensitive.\r\n * `sheetIndex`: the sheet number you want to stream (0-based).\r\n\r\n# Usage\r\n\r\n``` js\r\nnpm install -g excel-stream\r\nexcel-stream < accounts.xlsx > account.json\r\n```\r\n\r\n# options\r\n\r\nnewline delimited json:\r\n\r\n```js\r\nexcel-stream --newlines\r\n```\r\n\r\n# formats\r\n\r\neach row becomes a javascript object, so input like\r\n\r\n``` csv\r\nfoo, bar, baz\r\n  1,   2,   3\r\n  4,   5,   6\r\n```\r\n\r\nwill become\r\n\r\n``` js\r\n[{\r\n  foo: 1,\r\n  bar: 2,\r\n  baz: 3\r\n}, {\r\n  foo: 4,\r\n  bar: 5,\r\n  baz: 6\r\n}]\r\n\r\n```\r\n\r\n# Don't Look Now\r\n\r\nSo, excel isn't really a streamable format.\r\nBut it's easy to work with streams because everything is a stream.\r\nThis writes to a tmp file, then pipes it through the unfortunately named [j](https://npm.im/j)\r\nthen into [csv-stream](https://npm.im/csv-stream)\r\n\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md"}