
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
This project need Rust to be installed, check here for Rust installation instruction
This project using Rust and Neon as a binding to Rust to execute fast and efficient memory usage for generating XLSX document from NodeJs.
This project cannot be executed via NVM based NodeJs, you should deactivate (via
nvm deactivate
) or use a system version installation of NodeJs (vianvm use system
).
Writing a large amount of data into Excel file is not a trivial task when you have a limited memory (RAM) allocated. Especially when working at a small node on the server. This library is created to solve that problem, using the efficiency of Rust while generating a large datasheet of XLSX from CSV.
npm i -D cargo-cp-artifact
npm i fastexcel
The CSV generation is happen on the NodeJs side, and converting XLSX file is on Rust side (via Neon)
// dummy-excel.js
const path = require('path');
const { CsvFileWriter, Converter } = require("fastexcel");
const main = async () => {
const src = path.join(process.cwd(), 'example/source.csv');
const dst = path.join(process.cwd(), 'example/generated.xlsx');
const cols = [];
const totalCols = 200; // 200 columns
for (let i = 0; i < totalCols; i++) {
cols.push('Col ' + (i+1));
}
const writer = new CsvFileWriter(src, cols);
const totalRows = 3_00_000; // 300k rows
for (let i = 0; i < totalRows; i++) {
let row = [];
for (let i = 0; i < totalCols; i++) {
row.push('Col No ' + (i+1));
}
await writer.write(row);
}
await writer.close();
// Part 2: Convert csv to excel
const res = await Converter.toXLSX(
src,
dst
);
};
main();
FAQs
Fast and efficient large excel file writer
The npm package fastexcel receives a total of 6 weekly downloads. As such, fastexcel popularity was classified as not popular.
We found that fastexcel 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.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.