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

xlsxon

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

xlsxon

Simple parser from XLSX to json

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

xlsxon

Fork of xlsx_data_as_json

Adds minor functionality missing in the original package and includes some refactoring, however keeps the main package in tact.

Disclaimer: this package is pretty much useless, I only cooked this up to use in a different pet project without spending time on understanding the xlsx package which is used here

Usage

Installation

npm instal xlsxon

Examples

Server-side example usage

 const Xlsxon = require('xlsxon');

 const rows = Xlsxon.parseFile(__dirname + "/test.xlsx");

Browser-side example usage

import Xlsxon from 'xlsxon'

...

const fileReader = new FileReader()

fileReader.onload = () => {
    const data = fileReader.result

    const rows = Xlsxon.parse(data)
}

fileReader.readAsArrayBuffer(file)

Data sample

Given a following xlsx file

|   | A          | B                         | C     | D         | E |
|--:|------------|---------------------------|-------|-----------|---|
| 1 | Name       | Description               | Price | Image     |   |
| 2 | Piza       | Tomate sauce, Muzarella   | 10    | /img/piza |   |
| 3 | Hamburguer |                           | 12    |           |   |

you will receive the following json

[
    {
        "Name": "Piza",
        "Description": "Tomate sauce, Muzarella",
        "Price": "10",
        "Image": "/img/piza"
    },
    {
        "Name": "Hamburguer",
        "Description": "",
        "Price": "12",
        "Image": ""
    }
]

FAQs

Package last updated on 22 May 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