Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

xlsx2md-cli

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xlsx2md-cli

CLI tool for converting OpenXML spreadsheet documents to Pandoc's markdown grid tables.

latest
npmnpm
Version
1.8.1
Version published
Maintainers
1
Created
Source

xlsx2md-cli

A command-line tool for converting OpenXML spreadsheet documents (.xlsx) to Pandoc-compatible Markdown grid tables.

Features

  • Convert Excel spreadsheets to Markdown grid table format
  • Support for multiple sheets within a workbook
  • Flexible output options (STDOUT or file)
  • STDIN input support for piping
  • Configurable line width for table formatting
  • Locale-aware number and date formatting
  • Row trimming for selective data extraction
  • Sheet and table naming customization

Installation

npm install -g xlsx2md-cli

Or install locally:

npm install xlsx2md-cli

Usage

xlsx2md [options] [source]

Arguments

ArgumentDescription
sourcePath to an .xlsx file. If omitted, reads from STDIN.

Options

OptionDescription
-V, --versionOutput the version number
-v, --verboseAlways write the result to STDOUT.
--listList all sheet names in the workbook
-o, --output-path <FILE>Write output to a file instead of STDOUT
-n, --table-name <NAME...>Specify custom table name(s) for each sheet
-s, --sheet-name <NAME...>Specify one or more sheets in the workbook by name. If omitted, the first sheet is used
-w, --line-width <WIDTH>Set maximum characters per line. Defaults to terminal width or 72
-r, --use-raw-stringDisable string escaping in cell content
-t, --trim-rows <RANGE...>Extract only rows within the specified range(s), format: "start[,end]"
-l, --locale <LOCALE>Set localization for number/date formatting. Defaults to system locale
-h, --helpDisplay help information

Examples

Convert the first sheet

xlsx2md -v -o output.md sample.xlsx

Convert a specific sheet by name

xlsx2md -v -o output.md -s "Sheet1" sample.xlsx

Convert multiple sheets

xlsx2md -v -o output.md -s "Sheet1" -s "Sheet2" sample.xlsx

List all sheet names

xlsx2md --list sample.xlsx

Set custom table names

xlsx2md -o output.md -s "Sheet1" -n "My Table" sample.xlsx

Trim rows to a specific range

xlsx2md -o output.md -t "1,10" sample.xlsx

Extract rows from 5 to the end:

xlsx2md -o output.md -t "5,0" sample.xlsx

Use STDIN input

cat sample.xlsx | xlsx2md > output.md

Set custom line width

xlsx2md -w 120 -o output.md sample.xlsx

Disable string escaping

xlsx2md -r -o output.md sample.xlsx

Set locale for formatting

xlsx2md -l "en-US" -o output.md sample.xlsx

Output Format

The tool generates Pandoc-compatible Markdown grid tables, which can be rendered by Pandoc and other Markdown processors that support grid table syntax.

License

MIT

Keywords

pandoc

FAQs

Package last updated on 28 Mar 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