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

j

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

j - npm Package Compare versions

Comparing version 0.3.15 to 0.4.0

30

j.js

@@ -6,2 +6,3 @@ /* j -- (C) 2013-2014 SheetJS -- http://sheetjs.com */

var XLS = require('xl'+'sjs');
var HARB = require('ha'+'rb');
var UTILS = XLSX.utils;

@@ -11,3 +12,4 @@

["XLS", XLS],
["XLSX", XLSX]
["XLSX", XLSX],
["HARB", HARB]
];

@@ -26,3 +28,3 @@

/* Unknown */
default: return [undefined, f];
default: return [HARB, HARB.readFile(filename, options)];
}

@@ -40,3 +42,3 @@ };

/* Unknown */
default: return [undefined, data];
default: return [HARB, HARB.read(data.toString(), options)];
}

@@ -47,2 +49,3 @@ };

var XL = w[0], workbook = w[1];
if(!XL.utils.get_formulae) XL = XLSX;
var result = {};

@@ -58,2 +61,3 @@ workbook.SheetNames.forEach(function(sheetName) {

var XL = w[0], workbook = w[1];
if(!XL.utils.sheet_to_row_object_array) XL = XLSX;
var result = {};

@@ -69,2 +73,3 @@ workbook.SheetNames.forEach(function(sheetName) {

var XL = w[0], workbook = w[1];
if(!XL.utils.make_csv) XL = XLSX;
var result = {};

@@ -80,2 +85,3 @@ workbook.SheetNames.forEach(function(sheetName) {

var val, r, hdr, R, C, _XL = XL || XLS;
if(!XL.utils.format_cell) XL = XLSX;
hdr = [];

@@ -94,2 +100,3 @@ if(!sheet["!ref"]) return hdr;

var XL = w[0], wb = w[1];
if(!XL.utils.format_cell) XL = XLSX;
var tbl = {};

@@ -130,2 +137,3 @@ wb.SheetNames.forEach(function(sheet) {

var XL = w[0], wb = w[1];
if(!XL.utils.format_cell) XL = XLSX;
var tbl = {};

@@ -251,3 +259,3 @@ wb.SheetNames.forEach(function(sheet) {

var scencode = function(s) { return s.replace(/\\/g, "\\b").replace(/:/g, "\\c").replace(/\n/g,"\\n"); }
var scencode = function(s) { return s.replace(/\\/g, "\\b").replace(/:/g, "\\c").replace(/\n/g,"\\n"); };

@@ -276,2 +284,14 @@ var scsave = function scsave(ws) {

} break;
case 'b':
if(cell.f) {
oo[2] = 'vtf';
oo.push('nl');
oo.push(cell.v ? 1 : 0);
oo.push(scencode(cell.f));
} else {
oo[2] = 'vtc';
oo.push('nl');
oo.push(cell.v ? 1 : 0);
oo.push(cell.v ? 'TRUE' : 'FALSE');
} break;
}

@@ -289,3 +309,3 @@ o.push(oo.join(":"));

return [header, sep, meta, sep, scsave(ws), end].join("\n");
return ["version:1.5", scsave(ws)].join("\n");
// return ["version:1.5", scsave(ws)].join("\n"); // clipboard form
};

@@ -292,0 +312,0 @@ })();

3

package.json
{
"name": "j",
"version": "0.3.15",
"version": "0.4.0",
"author": "sheetjs",

@@ -20,2 +20,3 @@ "description": "CLI tool for working with XLS/XLSX/XLSM/XLSB files",

"xlsx": "~0.7.10",
"harb": "~0.0.2",
"concat-stream":"",

@@ -22,0 +23,0 @@ "commander":""

# J
Simple data wrapper that attempts to wrap [xlsjs](http://npm.im/xlsjs) and [xlsx](http://npm.im/xlsx) to provide a uniform way to access data from Excel files.
Simple data wrapper that attempts to wrap SheetJS libraries to provide a uniform way to access data from Excel and other spreadsheet files:
- [xlsjs](http://npm.im/xlsjs)
- [xlsx](http://npm.im/xlsx)
- [harb](http://npm.im/harb)
Excel files are parsed based on the content (not by filename). For example, CSV files can be renamed to .XLS and excel will do the right thing.

@@ -17,2 +21,6 @@

| XML (2003/2004, basic) | JS-XLS |
| DIF (plaintext) | JS-HARB |
| UTF-16 Text | JS-HARB |
| CSV / TSV | JS-HARB |
| SocialCalc | JS-HARB |

@@ -22,6 +30,8 @@ Output formats:

- XML and HTML work with [Excel Web Query](http://office.microsoft.com/en-us/excel-help/get-and-analyze-data-from-the-web-in-excel-HA001054848.aspx)
- CSV (and other delimited formats such as TSV)
- DSV (general delimiters, including CSV and TSV)
- JSON
- Formulae list (e.g. `A1=NOW()`, `A2=A1+3`)
- XLSX / XLSM work with iOS Numbers and Excel
- Markdown tables (GFM style)
- SocialCalc output

@@ -28,0 +38,0 @@ ## Installation

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