New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

xlsx-preview

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xlsx-preview

Preview the .xlsx in the browser, convert to HTML with styles.

latest
Source
npmnpm
Version
1.0.5
Version published
Weekly downloads
2K
-40.25%
Maintainers
1
Weekly downloads
 
Created
Source

XlsxPreview

Preview the .xlsx in the browser, convert to HTML with styles. The dependencies of this package is exceljs, it build the pretty preview by exceljs. And it can run in a Worker.

Demo

Jump to the demo page

Installation

  npm install xlsx-preview

or

  yarn add xlsx-preview

Importing

CommonJS

  const xlsxPreview = require('xlsx-preview');

ESModule

  import xlsxPreview from 'xlsx-preview';

Browserify

Before import xlsxPreview.js on browser, you need import excel.js first.

  <script src="exceljs.js"></script>
  <script src="xlsxPreview.js"></script>

Usage

  // ...
  const result = await xlsxPreview.xlsx2Html(data, options);

See data See options

data

The data can be one of the types, ArrayBuffer, Blob, or File.

options

The options is optional.

  export interface XlsxOptions {
    output?: "string" | "arrayBuffer";
    separateSheets: boolean;
    minimumRows: number;
    minimumCols: number;
  }
  • options.output: default "string", set the output format, string or ArrayBuffer.
  • separateSheets: default false, whether the worksheets needs to be separated.
    • If separateSheets: true, the result will be an Array.
  • minimumRows: default 20, Regardless of whether the worksheet has enough rows, the minimum number of rows generated.
  • minimumCols: default 16, Regardless of whether the worksheet has enough cols, the minimum number of cols generated.

Keywords

xlsx

FAQs

Package last updated on 24 Jan 2026

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