提交 5d79aca2 编写于 作者: S SheetJS

version bump 0.2.8: range fix

Fixes #37
上级 2a085af7
......@@ -103,7 +103,7 @@ function parseSheet(data) {
/* 18.3.1.35 dimension CT_SheetDimension ? */
var ref = data.match(/<dimension ref="([^"]*)"\s*\/>/);
if(ref && ref.indexOf(":") !== -1) s["!ref"] = ref[1];
if(ref && ref.length == 2 && ref[1].indexOf(":") !== -1) s["!ref"] = ref[1];
var refguess = {s: {r:1000000, c:1000000}, e: {r:0, c:0} };
var q = ["v","f"];
......@@ -121,9 +121,14 @@ function parseSheet(data) {
/* 18.3.1.4 c CT_Cell */
var cells = x.substr(x.indexOf('>')+1).split(/<c/);
cells.forEach(function(c, idx) { if(c === "" || c.trim() === "") return;
var cref = c.match(/r="([^"]*)"/);
c = "<c" + c;
if(refguess.s.c > idx - 1) refguess.s.c = idx - 1;
if(refguess.e.c < idx - 1) refguess.e.c = idx - 1;
if(cref && cref.length == 2) {
var cref_cell = decode_cell(cref[1]);
idx = cref_cell.c;
}
if(refguess.s.c > idx) refguess.s.c = idx;
if(refguess.e.c < idx) refguess.e.c = idx;
var cell = parsexmltag((c.match(/<c[^>]*>/)||[c])[0]); delete cell[0];
var d = c.substr(c.indexOf('>')+1);
var p = {};
......
{
"name": "xlsx",
"version": "0.2.7-d",
"version": "0.2.8",
"author": "Niggler",
"description": "(one day) a full-featured XLSX parser and writer. For now, primitive parser",
"keywords": [
......
此差异由.gitattributes 抑制。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册