
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Simple data wrapper that attempts to wrap xlsjs and xlsx to provide a uniform way to access data
var J = require('j');
J.readFile(filename)
opens the file specified by filename and returns an array
whose first object is the parsing object (XLS or XLSX) and whose second object
is the parsed file.
J.utils
has various helpers that expect an array like those from readFile:
to_csv(w) / to_dsv(w, delim)
will generate CSV/DSV respectivelyto_json(w)
will generate JSON row objectsto_html(w)
will generate simple HTML tablesto_xml(w)
will generate simple XMLThe node module ships with a binary j
which has a help message:
$ bin/j.njs --help
Usage: j.njs [options] <file> [sheetname]
Options:
-h, --help output usage information
-V, --version output the version number
-f, --file <file> use specified workbook
-s, --sheet <sheet> print specified sheet (default first sheet)
-l, --list-sheets list sheet names and exit
-S, --formulae print formulae
-j, --json emit formatted JSON rather than CSV (all fields text)
-J, --raw-js emit raw JS object rather than CSV (raw numbers)
-X, --xml emit XML rather than CSV
-F, --field-sep <sep> CSV field separator
-R, --row-sep <sep> CSV row separator
--dev development mode
--read read but do not print out contents
-q, --quiet quiet mode
Support email: dev@sheetjs.com
Web Demo: http://oss.sheetjs.com/
Please consult the attached LICENSE file for details. All rights not explicitly granted by the Apache 2.0 license are reserved by the Original Author.
Using git textconv, you can use J
to generate more meaningful diffs!
One-time configuration (same steps in misc/gitdiff.sh
:
#!/bin/bash
# Define a sheetjs diff type that uses j
git config --global diff.sheetjs.textconv "j"
# Configure a user .gitattributes file that maps the xls{,x,m} files
touch ~/.gitattributes
cat <<EOF >>~/.gitattributes
*.xlsm diff=sheetjs
*.xlsx diff=sheetjs
*.xls diff=sheetjs
*.XLSM diff=sheetjs
*.XLSX diff=sheetjs
*.XLS diff=sheetjs
EOF
# Set the .gitattributes to be used for all repos on the system:
git config --global core.attributesfile '~/.gitattributes'
FAQs
CLI tool for working with spreadsheet files
We found that j demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.