Convert CSV files to XLSX (Excel 2007+ XML Format) files via Node.js CLI or API.
npm install @aternus/csv-to-xlsx




Convert CSV files to XLSX (Excel 2007+ XML Format) files.
Written in JavaScript. Available for Node.js CLI and API.
Binaries are available for:
- Windows x64
- Linux x64
- macOS x64

Install with confidence 🛡️
- Binaries: download and run via your OS's command-line utility
- Fast and Reliable
- Full UTF-8 support
- CSV Column detection
- Batch mode: convert a CSV folder to an XLSX folder
- Node.js CLI and API
``shell`
npm install @aternus/csv-to-xlsx
Download the executables from the
latest release.
`shell`
./csv-to-xlsx-linux -i "input-file-or-directory" -o "output-directory"
Make sure to ONLY use the binaries provided by the project,
safe use of binaries (how to avoid viruses).
Type --help for a full list of options.
`shell`
npx @aternus/csv-to-xlsx -i "input-file-or-directory" -o "output-directory"
`javascript
const path = require('path');
const {convertCsvToXlsx} = require('@aternus/csv-to-xlsx');
let source = path.join(__dirname, 'report.csv');
let destination = path.join(__dirname, 'converted_report.xlsx');
try {
convertCsvToXlsx(source, destination);
} catch (e) {
console.error(e.toString());
}
`
One of the project's goals is to allow running the CSV to XLSX tool directly on
your computer.
Create a directory, put the executable inside of it, create a csv folder forxlsx
the CSVs and the folder will be populated with the converted files; plain
and simple, you don't even have to use a terminal (CLI).
To achieve this goal, we pack all the code that makes this possible into a
single file, called a binary. This binary has a couple of parts, a Node.js
runtime and the source code of this tool that uses it.
Unfortunately, this
causes some Antivirus programs to flag it as a Trojan.
This is a known issue and should be
fixed when Node.js ships with a built-in mode for
generating single executable applications.
Until then, **please make sure that you download binaries from the
release page of csv-to-xlsx**.
If you have doubts about the origin of your executable, you can check the
sha256 of your executable against the one specified in the release assets.
macOS / Linux
`shell`
shasum -a 256 ./csv-to-xlsx-macos
Windows:
`shell`
certutil -hashfile .\csv-to-xlsx-win.exe SHA256
csv-to-xlsx binary - macOS.webm
csv-to-xlsx binary - windows.webm
Released under the MIT License - see LICENSE.md` for details.