xlsx-to-csv-ts
TypeScript icon, indicating that this package has built-in type declarations

1.0.10 • Public • Published

XLSX to CSV

A simple script to convert .xlsx file to .csv file, with the ability to filter / rename columns.

NPM Version GitHub Release npm bundle size MIT License Build Status GitHub Repo stars

Introduction

A simple script to convert .xlsx file to .csv file, with the ability to filter / rename columns.

Install

To install, run the following command in your terminal:

npm install xlsx-to-csv-ts

Usage

Import

To use xlsx-to-csv-ts in your Node.js project, you need to import it as follows:

import { convertXlsxToCsv } from "xlsx-to-csv-ts";

Example

const result = await convertXlsxToCsv({
  inputFile: "./public/sample.xlsx",
  outputFilename: "sample-filtered",
  outputDir: "./public/",
  filter: { Segment: "segment", Country: "country" },	// Format: { "original column": "renamed column", ... }
});

console.log(result.outputPath)

/xlsx-to-csv-ts/

    Package Sidebar

    Install

    npm i xlsx-to-csv-ts

    Weekly Downloads

    0

    Version

    1.0.10

    License

    none

    Unpacked Size

    53.5 kB

    Total Files

    9

    Last publish

    Collaborators

    • joe_siu