🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

xlsx-to-js

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xlsx-to-js

A TypeScript-based library for parsing Excel (XLSX) with browser support

1.0.3
latest
Source
npm
Version published
Weekly downloads
112
19.15%
Maintainers
1
Weekly downloads
 
Created
Source

Xlsx-to-js

A TypeScript-based library for parsing Excel (XLSX) with browser support.

Getting Started

Installation

With npm:

npm install --save xlsx-to-js

Import library:

import { XlsxParser } from "xlsx-to-js";

Usage

Parsing Workbooks

Extract data from spreadsheet bytes

const xlsxParser = new XlsxParser();
const workbook = await xlsxParser.readFile(file, { dense: true, styles: true, drawings: true, skipHiddenRows: true });

The readFile method extract data from spreadsheet bytes stored in a ArrayBuffer.

The second argument to options accepts the properties:

OptionDefaultDescription
densefalseWhen the option dense: false is passed, parsers will skip empty cells.
stylesfalseWhen the opction styles: false is passed, parsers will skip cell styles.
drawingsfalseWhen the option drawings: false is passed, parsers will skip parsing drawings and graphical objects.
skipHiddenRowsfalseWhen the option skipHiddenRows: true is passed, hidden rows will be ignored during parsing.

References

  • ISO/IEC 29500:2012 "Office Open XML File Formats — Fundamentals And Markup Language Reference"

Keywords

excel

FAQs

Package last updated on 18 May 2025

Did you know?

Socket

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.

Install

Related posts