项目作者: Aternus

项目描述 :
Convert CSV files to XLSX (Excel 2007+ XML Format) files.
高级语言: JavaScript
项目地址: git://github.com/Aternus/csv-to-xlsx.git
创建时间: 2018-09-17T21:04:33Z
项目社区:https://github.com/Aternus/csv-to-xlsx

开源协议:MIT License

下载


@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

validate

Install with confidence 🛡️

Features

  • 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

Installation

  1. npm install @aternus/csv-to-xlsx

Usage

Binaries

Download the executables from the
latest release.

  1. ./csv-to-xlsx-linux -i "input-file-or-directory" -o "output-directory"

Node.js CLI

Type --help for a full list of options.

  1. npx @aternus/csv-to-xlsx -i "input-file-or-directory" -o "output-directory"

Node.js API

  1. const path = require('path');
  2. const {convertCsvToXlsx} = require('@aternus/csv-to-xlsx');
  3. let source = path.join(__dirname, 'report.csv');
  4. let destination = path.join(__dirname, 'converted_report.xlsx');
  5. try {
  6. convertCsvToXlsx(source, destination);
  7. } catch (e) {
  8. console.error(e.toString());
  9. }

License

Released under the MIT License - see LICENSE.md for details.