Skip to main content

Sheets on the Command Line

With the availability of JS engines and the success of server-side platforms, it is possible to build standalone command-line tools from JavaScript code.

SheetJS is a JavaScript library for reading and writing data from spreadsheets.

This demo covers a number of strategies for building standalone spreadsheet processors. The ultimate goal is to use SheetJS libraries to generate CSV output from arbitrary spreadsheet files. The generated command-line tool will accept an argument, parse the specified workbook, and print CSV rows to the terminal.

Sample terminal session
> xlsx-cli.exe pres.numbers
Name,Index
Bill Clinton,42
GeorgeW Bush,43
Barack Obama,44
Donald Trump,45
Joseph Biden,46

Demos for common standalone CLI tools are included in separate pages:

  • nexe - Prebuilt NodeJS packages
  • pkg - Prebuilt NodeJS packages
  • boxednode - NodeJS binaries with scripts, built from source
  • NodeJS SEA - Single Executable Applications
  • BunJS SEA - BunJS Single-file Executables
  • Deno SEA - Deno Standalone Binaries

Platform Support

The following frameworks have been tested on the following platforms:

The xlsx-cli NodeJS script is available as a package on the SheetJS CDN. It is a straightforward command-line tool for translating files between supported spreadsheet file formats.

For most common deployment scenarios, it is possible to install a server-side platform such as NodeJS.

It is strongly recommended to use a dedicated platform when possible.

The standalone programs generated in this demo are useful when a dedicated server-side scripting platform cannot be installed on the target computer.

NodeJS

This demo has been organized by framework:

V8

The exposition has been moved to the "V8" demo.

BunJS

The exposition has been moved to a separate page.

Deno

The exposition has been moved to a separate page.

Dedicated Engines

The following demos for JS engines produce standalone programs: