forked from sheetjs/sheetjs
SheetJS
009946339c
- eliminated functional constructs in hot functions - format try-catch block extracted into new function - cpexcel + codepage updated to 1.2.0 - more efficient (and correct) clean implementation of RGB/HSL/tint algorithms - xlsx binary --all option enables every extra formatting and saving option - column widths parsed and saved (requires cellStyles:true)
31 lines
771 B
JavaScript
31 lines
771 B
JavaScript
/* [MS-XLSB] 2.6.4.1 */
|
|
var parse_BrtCalcChainItem$ = function(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(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) { }
|