
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@borgar/xlsx-convert
Advanced tools
This is a Node.js utility to convert Excel XLSX files to JSON format. It supports only XLSX files and outputs JSF (JSON spreadsheet format), a variant of CSF (see below).
This utility was developed as tooling for GRID – The new face of spreadsheets, to which it owes a debt of gratitude.
The library is also provided as an NPM package:
$ npm install @borgar/xlsx-convert
// import the converter
import xlsxConvert from '@borgar/xlsx-convert';
// read the file
const jsf = await xlsxConvert('path/to/workbook.xlsx', options);
// emit results
console.log(jsf);
This will emit a structure like this:
{
"filename": "workbook.xlsx",
"sheets": [
{
"cells": {
"A1": { "v": 12 },
"B1": { "v": 123.1 },
"A2": { "v": "Total" },
"B2": { "v": 135.1, "f": "SUM(A1:B1)", },
},
"merges": [],
"colWidths": [],
"rowHeights": [],
"hidden": 0,
"name": "Sheet1"
}
],
"names": [],
"styles": [
{ "font-size": 12 }
]
}
The JSON spreadsheet format is similar to, but not 100% compatible with the CSF structure emitted by the xlsx
package. Supported cell properties are:
Cell. | Note |
---|---|
v | Value of the cell in its correct type. |
f | An integer index into a list of formula expressions in R1C1-syntax, or an expression string in A1-syntax. |
F | The A1-style range of enclosing array if the formula is an array formula. |
c | A list of comments attached to the cell. |
s (optional) | Index of style information associated with the cell. |
t (optional) | A type for the value in the cell (this library only emits an "e" when the value is an error). |
l (optional) | A URL attached to the cell. |
Only cells that have "relevant data" are emitted, which in praxis means cells that have such things as values, formula, and visible styles attached to them.
Documentation can be found under docs/:
FAQs
Utility to convert Excel XLSX files to JSON
The npm package @borgar/xlsx-convert receives a total of 289 weekly downloads. As such, @borgar/xlsx-convert popularity was classified as not popular.
We found that @borgar/xlsx-convert demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.