Comparing version 0.2.9 to 0.2.10
10
j.js
/* j -- (C) 2013-2014 SheetJS -- http://sheetjs.com */ | ||
/* vim: set ts=2: */ | ||
/*jshint node:true */ | ||
var XLSX = require('xlsx'); | ||
@@ -10,5 +11,5 @@ var XLS = require('xlsjs'); | ||
/* CFB container */ | ||
case 0xd0: return [XLS, XLS.readFile(filename)]; | ||
case 0xd0: return [XLS, XLS.readFile(filename, options)]; | ||
/* Zip container */ | ||
case 0x50: return [XLSX, XLSX.readFile(filename)]; | ||
case 0x50: return [XLSX, XLSX.readFile(filename, options)]; | ||
/* Unknown */ | ||
@@ -41,4 +42,5 @@ default: return [undefined, f]; | ||
var val, r, hdr, R, C, _XL = XL || XLS; | ||
hdr = []; | ||
if(!sheet["!ref"]) return hdr; | ||
r = _XL.utils.decode_range(sheet["!ref"]); | ||
hdr = []; | ||
for (R = r.s.r, C = r.s.c; C <= r.e.c; ++C) { | ||
@@ -102,3 +104,3 @@ val = sheet[_XL.utils.encode_cell({c:C, r:R})]; | ||
xml += "<" + s + ">"; | ||
js.forEach(function(r) { | ||
(js||[]).forEach(function(r) { | ||
xml += "<" + s + "Data>"; | ||
@@ -105,0 +107,0 @@ for(var y in r) if(r.hasOwnProperty(y)) xml += "<" + y.replace(cleanregex,"") + ">" + escapexml(r[y]) + "</" + y.replace(cleanregex,"") + ">"; |
{ | ||
"name": "j", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"author": "sheetjs", | ||
@@ -5,0 +5,0 @@ "description": "data wrangler", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11424
124