Skip to content

Yousef-Essam/excelJSON

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

excelJSON

A simple package based on the xlsx package to covert from Spreadsheet data to JSON and vice versa

Installation

npm install excel2json_converter

Usage

Importing the package

const excelJSON = require('excel2json_converter')

To convert Spreadsheet data to JSON data

let xlsxFile = await fs.readFile('file.xlsx');
let convertedJSON = excelJSON.XLSXToJson(xlsxFile, 'Sheet Name')
// The second parameter is required and it represents the sheet name inside the Spreadsheet file.

To convert JSON data to Spreadsheet data

let jsonFile = JSON.parse(await fs.readFile('file.json', 'utf-8')); let convertedXLSX = excelJSON.jsonToXLSX(jsonFile, 'Sheet Name')
// The second parameter is required and it represents the sheet name inside the xlsx file.
// This function produces an excel file with only one sheet whose name is provided using the second parameter

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published