{"id":15764533,"url":"https://github.com/vikramthyagarajan/node-excel-stream","last_synced_at":"2025-10-09T23:19:41.561Z","repository":{"id":16462713,"uuid":"79990796","full_name":"vikramthyagarajan/node-excel-stream","owner":"vikramthyagarajan","description":"A utility to read and write JSON data to excel in streams","archived":false,"fork":false,"pushed_at":"2023-03-03T15:54:33.000Z","size":359,"stargazers_count":20,"open_issues_count":15,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-09T23:19:40.948Z","etag":null,"topics":["excel","json","nodejs","parsing","stream","writing","xlsx"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vikramthyagarajan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-25T06:56:51.000Z","updated_at":"2025-06-14T19:13:53.000Z","dependencies_parsed_at":"2024-06-19T01:26:22.128Z","dependency_job_id":"7710a58d-fe86-45c5-9183-99be5010e5dc","html_url":"https://github.com/vikramthyagarajan/node-excel-stream","commit_stats":{"total_commits":46,"total_committers":5,"mean_commits":9.2,"dds":"0.23913043478260865","last_synced_commit":"74c78a4bd82308ad7cc663e45fec60fa3c3cbdfe"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/vikramthyagarajan/node-excel-stream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikramthyagarajan%2Fnode-excel-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikramthyagarajan%2Fnode-excel-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikramthyagarajan%2Fnode-excel-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikramthyagarajan%2Fnode-excel-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vikramthyagarajan","download_url":"https://codeload.github.com/vikramthyagarajan/node-excel-stream/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikramthyagarajan%2Fnode-excel-stream/sbom","scorecard":{"id":921586,"data":{"date":"2025-08-11","repo":{"name":"github.com/vikramthyagarajan/node-excel-stream","commit":"74c78a4bd82308ad7cc663e45fec60fa3c3cbdfe"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":1,"reason":"Found 3/16 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-8cv5-p934-3hwp","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-25T03:52:41.520Z","repository_id":16462713,"created_at":"2025-08-25T03:52:41.520Z","updated_at":"2025-08-25T03:52:41.520Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002344,"owners_count":26083340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["excel","json","nodejs","parsing","stream","writing","xlsx"],"created_at":"2024-10-04T12:04:01.601Z","updated_at":"2025-10-09T23:19:41.535Z","avatar_url":"https://github.com/vikramthyagarajan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-excel-stream [![npm version](https://badge.fury.io/js/node-excel-stream.svg)](https://badge.fury.io/js/node-excel-stream) [![Build Status](https://travis-ci.org/vikramthyagarajan/node-excel-stream.svg?branch=master)](https://travis-ci.org/vikramthyagarajan/node-excel-stream)\nA utility to read and write excels using streams in Node\n\nThis package provides ExcelWriter and ExcelReader classes that can be used to writer and parse excel respectively\n\n## Installation\n```\nnpm install node-excel-stream\n```\nUsage with es5\n```\n// with es5\nvar ExcelReader = require('node-excel-stream').ExcelReader;\nvar ExcelWriter = require('node-excel-stream').ExcelWriter;\n// or with es6 imports\nimport { ExcelReader, ExcelWriter } from 'node-excel-stream';\n```\n\n## Usage\n\n### Parsing Workbooks\nWorkbooks must be given a schema before they are parsed. If the excel format does not match the given schema, then an error is thrown. Then, each row in each sheet can be parsed using the eachRow function, which returns a promise when resolves after all rows are parsed.\n\nInput: data.xlsx, Sheet: Users\n\n| User Name | Value |\n|:----------|:-----:|\n| John | 10 |\n| Rohan | 30 |\n| Pooja | 50 |\n\nParsing:\n```\nlet dataStream = fs.createReadStream('data.xlsx');\nlet reader = new ExcelReader(dataStream, {\n    sheets: [{\n        name: 'Users',\n        rows: {\n            headerRow: 1,\n            allowedHeaders: [{\n                name: 'User Name',\n                key: 'userName'\n            }, {\n                name: 'Value',\n                key: 'value',\n                type: Number\n            }]\n        }\n    }]\n})\nconsole.log('starting parse');\nreader.eachRow((rowData, rowNum, sheetSchema) =\u003e {\n    console.log(rowData);\n})\n.then(() =\u003e {\n    console.log('done parsing');\n});\n```\n\nOutput:\n```\nstarting parse\n{ userName: 'John', value: 10 }\n{ userName: 'Rohan', value: 10 }\n{ userName: 'Pooja', value: 10 }\nfinished parse\n```\n\nNOTE: A list of types that can be passed can be found on the [Exceljs](https://github.com/guyonroche/exceljs) project\n\n### Writing Workbooks\nWorkbooks must be given a schema for each sheet before it can be written to. Data is then added to the workbook in the form of json. All this data is saved to the sheet using the save function, which returns a promise which resolves the stream. This stream can then be piped or written to the fileSystem using the fs module.\n\nInput: var inputs\n```\n[\n    {name: 'Test 1', testValue: 100},\n    {name: 'Test 2'},\n    {name: 'Test 3', testValue: 80}\n]\n```\n\nWriting:\n```\nlet writer = new ExcelWriter({\n    sheets: [{\n        name: 'Test Sheet',\n        key: 'tests',\n        headers: [{\n            name: 'Test Name',\n            key: 'name'\n        }, {\n            name: 'Test Coverage',\n            key: 'testValue',\n            default: 0\n        }]\n    }]\n});\nlet dataPromises = inputs.map((input) =\u003e {\n    // 'tests' is the key of the sheet. That is used\n    // to add data to only the Test Sheet\n    writer.addData('tests', input);\n});\nPromise.all(dataPromises)\n.then(() =\u003e {\n    return writer.save();\n})\n.then((stream) =\u003e {\n    stream.pipe(fs.createWriteStream('data.xlsx'));\n});\n```\n\nOutput:\nInput: data.xlsx, Sheet: Test Sheet\n\n| Test Name | Test Coverage |\n|:----------|:-----:|\n| Test 1 | 100 |\n| Test 2 | 0 |\n| Test 3 | 80 |\n\n\n## Configuration\n\n### Reading\nnode-excel-stream takes a schema to strictly check the excel format while reading. This makes sure that the excel contains data in the correct format, and throws errors when there is a mismatch.\n\nConfiguration options -\n```\n{\n    sheets: [{\n        name: 'Users',              // The name of the sheet. Required\n        key: 'users',               // The key of the sheet. Optional. Used to identify the sheet while getting the row data\n        rows: {\n            headerRow: 1,           // The row that contains the headers. Rows above this are ignored. Default: 1\n            allowedHeaders: [{\n                name: 'User Name',  // The text value of the header cell\n                key: 'userName',    // The identifier for the header. Will be the field name in the row data json\n                type: String        // The type, for strict type checking for the data\n            }]\n        }\n    }]\n}\n```\n\n## Contributing\nPRs are always welcome. Thank you to all contributors :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikramthyagarajan%2Fnode-excel-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikramthyagarajan%2Fnode-excel-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikramthyagarajan%2Fnode-excel-stream/lists"}