forked from sheetjs/sheetjs
SheetJS
6bc24374b9
- parsexmltag and other hot functions now better optimized for v8 - monomorphic functions (different types -> different funcs) - more efficient decode_range implementation when source is trusted - regular expressions cached and simplified without breaking correctness - more efficient utf8 techniques when available - XLSX: large functions broken down into sub-functions (e.g. `parse_ws_xml`) - XLSB: avoid unnecessary binds - XLSB: assume no exotic codepage exists (no one else tries to write XLSB) - demo exposes rABS / worker / transferable options - more tests - jszip updated to 2.3.0 - SSF updated to 0.8.1 - codepage updated to 1.3.1
31 lines
774 B
JavaScript
31 lines
774 B
JavaScript
/* [MS-XLSB] 2.6.4.1 */
|
|
function parse_BrtCalcChainItem$(data, length) {
|
|
var out = {};
|
|
out.i = data.read_shift(4);
|
|
var cell = {};
|
|
cell.r = data.read_shift(4);
|
|
cell.c = data.read_shift(4);
|
|
out.r = encode_cell(cell);
|
|
var flags = data.read_shift(1);
|
|
if(flags & 0x2) out.l = '1';
|
|
if(flags & 0x8) out.a = '1';
|
|
return out;
|
|
}
|
|
|
|
/* 18.6 Calculation Chain */
|
|
function parse_cc_bin(data, opts) {
|
|
var out = [];
|
|
var pass = false;
|
|
recordhopper(data, function hopper_cc(val, R, RT) {
|
|
switch(R.n) {
|
|
case 'BrtCalcChainItem$': out.push(val); break;
|
|
case 'BrtBeginCalcChain$': break;
|
|
case 'BrtEndCalcChain$': break;
|
|
default: if(!pass || opts.WTF) throw new Error("Unexpected record " + RT + " " + R.n);
|
|
}
|
|
});
|
|
return out;
|
|
}
|
|
|
|
function write_cc_bin(data, opts) { }
|