https://grokonez.com/node-js/node-js-import-excel-file-to-mongodb-using-convert-excel-to-json-lib

Node.js Import Excel File to MongoDB – using Convert-Excel-To-Json lib

In the tutorial, Grokonez shows how to import data from Excel File to MongoDB with Node.js using Convert-Excel-To-Json lib.

Related posts: - Nodejs Express RestAPI – Upload/Import Excel file/data to MongoDB – using Convert-Excel-to-Json + Multer

Technologies

  • Node.js
  • MongoDB
  • Convert-Excel-To-Json

Goal

– We create a Node.js project as below structure:

node.js-import-excel-file-to-mongodb-using-convert-excel-to-json-lib-project-structure-1

– Excel File:

node.js-import-excel-file-to-mongodb-using-convert-excel-to-json-lib-excel-file-1

-> Results:

node.js-import-excel-file-to-mongodb-using-convert-excel-to-json-lib-mongodb-documents

Practice

Install MongoDB & Convert-Excel-To-Json

Init package.json file by cmd: npm init -> Then install mongodb & convert-excel-to-json libs:

$npm install mongodb
$npm install convert-excel-to-json

-> package.json file:

{
  "name": "node.js-import-excel-file-to-mongodb",
  "version": "1.0.0",
  "description": "Node.js Import Excel File to MongoDB with Convert-Excel-To-Json lib",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
	"start": "node index.js"
  },
  "keywords": [
    "Node.js",
    "Excel",
    "MongoDB",
    "Convert-Excel-To-JSON"
  ],
  "author": "grokonez.com",
  "license": "ISC",
  "dependencies": {
    "convert-excel-to-json": "^1.6.1",
    "mongodb": "^3.1.13"
  }
}

Import Excel File to MongoDB

More at:

https://grokonez.com/node-js/node-js-import-excel-file-to-mongodb-using-convert-excel-to-json-lib

Node.js Import Excel File to MongoDB – using Convert-Excel-To-Json lib

#nodejs #excel #mongodb #restapi

Node.js Import Excel File to MongoDB – using Convert-Excel-To-Json lib » grokonez
7.65 GEEK