
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
sheet-to-array-browser
Advanced tools
Convert Excel/Sheet files (.xlsx
, .xls
) into JavaScript arrays with ease.
Works in both browsers (via <input type="file">
or drag-drop) and Node.js.
.xlsx
and .xls
files into JSON/arraysnpm i sheet-to-array-browser
import { parseWorkbook } from "sheet-to-array-browser";
document.getElementById("fileInput").addEventListener("change", async (e) => {
const file = e.target.files[0];
const rows = await parseWorkbook(file, { sheet: 0 });
console.log(rows);
});
import { readFileSync } from "fs";
import { parseWorkbook } from "sheet-to-array-browser";
const buffer = readFileSync("./example.xlsx");
const rows = await parseWorkbook(buffer, { sheet: "Data" });
console.log(rows);
parseWorkbook(input, options?)
input
File
| Blob
| ArrayBuffer
| Buffer
(Works with browser files, Node Buffers, or raw ArrayBuffers)
options
(optional)
sheet
(number | string
) → Which sheet to read
index (0
= first sheet)
or sheet name ("Data"
)
default: 0
sheetToJson
(XLSX.Sheet2JSONOpts
) → Options passed to XLSX.utils.sheet_to_json
Returns
Promise<Array<object>>
→ An array of row objects.
npm install
npm run build
npm test
npm run build → Build dist files
npm test → Run unit tests (Vitest)
npm run pack:check → Preview files that will publish
FAQs
converts sheet data to javascript array
The npm package sheet-to-array-browser receives a total of 208 weekly downloads. As such, sheet-to-array-browser popularity was classified as not popular.
We found that sheet-to-array-browser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.