Secure your data exports - encrypt and password protect sensitive CSV and XLSX files
Last updated 7 months ago by ankane .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install secure-spreadsheet 
SYNC missed versions from official npm registry.

Secure Spreadsheet

:fire: Secure your data exports - encrypt and password protect sensitive CSV and XLSX files

The Office Open XML format provides a standard for encryption and password protection

Works with Excel, Numbers, and LibreOffice Calc

Getting Started

Install the CLI

npm install -g secure-spreadsheet

Convert a CSV into password-protected, AES-256 encrypted XLSX

cat input.csv | secure-spreadsheet --password secret > output.xlsx

Protect an existing XLSX

cat input.xlsx | secure-spreadsheet --password secret --input-format xlsx > output.xlsx


Many languages don’t have libraries to create encrypted spreadsheets. Luckily, we can use the CLI.


require "csv"

csv_str = CSV.generate do |csv|
  csv << ["awesome", "csv"]

result = IO.popen("secure-spreadsheet --password secret", "r+") do |io|
end"output.xlsx", "w") { |f| f.write(result) }

Other Approaches

An alternative approach to secure your data is to create a password-protected ZIP archive. However, this leaves the data exposed after it’s unzipped.


The content type for XLSX is application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.


Thanks to xlsx-populate for providing the encryption and password protection.


View the changelog


Everyone is encouraged to help improve this project. Here are a few ways you can help:

Current Tags

  • 0.1.1                                ...           latest (7 months ago)

2 Versions

  • 0.1.1                                ...           7 months ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 3
Dependencies (4)
Dev Dependencies (1)
Dependents (0)

Copyright 2014 - 2016 © |