
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
xlsx-encrypter
Advanced tools
Service for generating and encrypting Excel/XLSX files.
npm i xlsx-encrypter
or use Yarn
yarn add xlsx-encrypter
Simple usage:
import { XlsxGenerator } from "xlsx-encrypter";
const xlsxGenerator = new XlsxGenerator();
const data = [
{
fruit: "Apples",
quantity: 4,
price: "£6.86",
},
];
// Create worksheets
const workSheet = xlsxGenerator.createWorkSheet(data, "Fruit Sales");
// Create XLSX file
void xlsxGenerator.exportWorkSheetsToFile("/file-dir/file-name.xlsx", [
workSheet,
]);
or the older way
const XlsxGenerator = require("xlsx-encrypter");
const data = [
{
fruit: "Apples",
quantity: 4,
price: "£6.86",
},
];
// Create worksheets
const workSheet = XlsxGenerator.createWorkSheet(data, "Fruit Sales");
// Create XLSX file
void XlsxGenerator.exportWorkSheetsToFile("/file-dir/file-name.xlsx", [
workSheet,
]);
Can handle multiple worksheets.
import { XlsxGenerator } from "xlsx-encrypter";
const xlsxGenerator = new XlsxGenerator();
const data1 = [
{
fruit: "Apples",
quantity: 4,
price: "£6.86",
},
];
const data2 = [
{
fruit: "Oranges",
quantity: 2,
price: "£3.26",
},
];
// Create worksheets
const workSheet1 = xlsxGenerator.createWorkSheet(data1, "Fruit Sales: May");
const workSheet2 = xlsxGenerator.createWorkSheet(data2, "Fruit Sales: June");
// Create XLSX file
void xlsxGenerator.exportWorkSheetsToFile("/file-dir/file-name.xlsx", [
workSheet1,
workSheet2,
]);
Default headers can be added. NOTE: Headers must match data structure exactly.
import { XlsxGenerator } from "xlsx-encrypter";
const xlsxGenerator = new XlsxGenerator();
const data = [
{
fruit: "Apples",
quantity: 4,
price: "£6.86",
},
];
const headers = ["fruit", "quantity", "price"];
// Create worksheets
const workSheet = xlsxGenerator.createWorkSheet(data, "Fruit Sales", headers);
// Create XLSX file
void xlsxGenerator.exportWorkSheetsToFile("/file-dir/file-name.xlsx", [
workSheet,
]);
The cell origin of the data can be specified in A1 format.
import { XlsxGenerator } from "xlsx-encrypter";
const xlsxGenerator = new XlsxGenerator();
const data = [];
const headers = ["fruit", "quantity", "price"];
const cellOrigin = "B2";
// Create worksheets
const workSheet = xlsxGenerator.createWorkSheet(
data,
"Fruit Sales",
headers,
cellOrigin
);
// Create XLSX file
void xlsxGenerator.exportWorkSheetsToFile("/file-dir/file-name.xlsx", [
workSheet,
]);
import { XlsxGenerator } from "xlsx-encrypter";
const xlsxGenerator = new XlsxGenerator();
const data = [];
const password = "SuperSecurePassword";
// Create worksheets
const workSheet = xlsxGenerator.createWorkSheet(data, "Fruit Sales");
// Create XLSX file with password
void xlsxGenerator.exportWorkSheetsToFile(
"/file-dir/file-name.xlsx",
[workSheet],
password
);
To write and test code you will need NodeJS and Yarn installed. If your on a Mac, use Homebrew for installation.
brew install node
brew install yarn
Install project dependencies
yarn
Unit tests use jest. Tests can be run globally from the root directory by running yarn test
yarn test
Code style is enforced by using a linter (eslint) and Prettier.
yarn lint
Automated deployment is undertaken with CircleCI.
main: Deploy to NPMYou'll need to bump the package version numbers manually for changes to be pushed to the npm registry.
Have a bug? File an issue with a simple example that reproduces this so we can take a look and confirm.
Want to make a change? Submit a PR, explain why it's useful, and make sure you've updated the docs (this file) and the tests.
![]()
Theo Jones - MrKiplin
FAQs
Service for generating and encrypting Excel/XLSX files
We found that xlsx-encrypter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.