Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xltodb

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xltodb

XlToDb is a node package that collects data from an excel file and adds the collected rows to the MongoDB database. The package uses the column header or the 1st row as the key elements and forms an object with each row. Quick and easy to implement.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

XlToDb

XlToDb is a node package that collects data from an excel file and adds the collected rows to the MongoDB database. The package uses the column header or the 1st row as the key elements and forms an object with each row. Quick and easy to implement.

Installation

Use the node npm to install XlToDb.

npm install xltodb

Example Usage

const xltodb = require('xltodb')

// initiate mongo client
const { MongoClient } = require("mongodb");
const client = new MongoClient('mongodb_connection_string')

// Instantiate Transify
let XlToDb = new xltodb('./test_sheet.xlsx')

// Convert the excel data to json object
let dataInJson = XlToDb.xlToJson()

// Save the data to MongoDB
XlToDb.saveToDb(client, "DataBase_Name", "collection_name").then((result)=>{
    console.log(result)
})

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Keywords

FAQs

Package last updated on 09 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc