New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

xlsx-to-directories

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xlsx-to-directories

xlsx-to-directories module expose one functionality that take a file with .xlsx extension and create a new directory for each row in the specified ouput directory.

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Xlsx to Direcotries Core

xlsx-to-directories module expose one functionality that take a file with .xlsx extension and create a new directory for each row in the specified ouput directory.

Structure of the .xlsx file

A1B1
1Azienda1
2Azienda2
...Azienda...

There must be two columns. Except for the first row that is intended as labels, the follwings rows must be of type number for the first column and type string for the second column.

How it works

Start parsing the file one row at a time. If it is the fist row (the row with the labels), do nothing. If the two columns of the row contains correct values, combine them into one single string. Otherwise do nothing for incorrect values. Create a new directory in the path specified in input using the new created srting as the directory name name. When there is no more rows left terminate the script.

How to use it

Install the module

npm i --save xlsx-to-directories

Import and usage

const xlsxToDir = require('xlsx-to-directories')

xlsxToDir('path_to_file', 'path_to_dir')
  .then(count => {
    console.log(`${count} new folder${count > 1 ? 's' : ''}`)
  })
  .catch(error => {
    console.error(error)
  })

FAQs

Package last updated on 02 Dec 2018

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