version bump 0.1.4

- Handle 'e' error cells (sticking the actual error code in .err, .v undefined)
- Added quot and apos to encodings
This commit is contained in:
SheetJS 2013-03-20 17:30:30 -04:00
parent 91266af9aa
commit d5da2eb017
2 changed files with 7 additions and 1 deletions

@ -1,6 +1,6 @@
{
"name": "xlsx",
"version": "0.1.3",
"version": "0.1.4",
"author": "Niggler",
"description": "(one day) a full-featured XLSX parser and writer. For now, primitive parser",
"keywords": [

@ -69,6 +69,8 @@ var XMLNS_CT = 'http://schemas.openxmlformats.org/package/2006/content-types';
var XMLNS_WB = 'http://schemas.openxmlformats.org/spreadsheetml/2006/main';
var encodings = {
'"': '"',
''': "'",
'>': '>',
'&lt;': '<',
'&amp;': '&'
@ -130,6 +132,8 @@ function parseSheet(data) { //TODO: use a real xml parser
case '1': case 'TRUE': case "true": case true: p.v=true; break;
default: throw "Unrecognized boolean: " + p.v;
} break;
/* in case of error, stick value in .err */
case 'e': p.err = p.v; p.v = undefined; break;
default: throw "Unrecognized cell type: " + p.t;
}
//s.cells[cell.r] = p;
@ -436,6 +440,7 @@ function sheet_to_row_object_array(sheet){
emptyRow = false;
}
break;
case 'e': break; /* thorw */
default: throw 'unrecognized type ' + val.t;
}
}
@ -453,6 +458,7 @@ function sheet_to_csv(sheet) {
case 'n': return val.v;
case 's': case 'str': return JSON.stringify(val.v);
case 'b': return val.v ? "TRUE" : "FALSE";
case 'e': return ""; /* throw out value in case of error */
default: throw 'unrecognized type ' + val.t;
}
};