Skip to content

Commit 222995e

Browse files
committed
fix: #2432
1 parent 2b45480 commit 222995e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

bits/76_xls.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ function parse_workbook(blob, options/*:ParseOpts*/)/*:Workbook*/ {
115115
var arrayf/*:Array<[Range, string]>*/ = [];
116116
var temp_val/*:Cell*/;
117117
var country;
118-
var cell_valid = true;
119118
var XFs = []; /* XF records */
120119
var palette/*:Array<[number, number, number]>*/ = [];
121120
var Workbook/*:WBWBProps*/ = ({ Sheets:[], WBProps:{date1904:false}, Views:[{}] }/*:any*/), wsprops = {};
@@ -135,8 +134,7 @@ function parse_workbook(blob, options/*:ParseOpts*/)/*:Workbook*/ {
135134
};
136135
var addcell = function addcell(cell/*:any*/, line/*:any*/, options/*:any*/) {
137136
if(file_depth > 1) return;
138-
if(options.sheetRows && cell.r >= options.sheetRows) cell_valid = false;
139-
if(!cell_valid) return;
137+
if(options.sheetRows && cell.r >= options.sheetRows) return;
140138
if(options.cellStyles && line.XF && line.XF.data) process_cell_style(cell, line, options);
141139
delete line.ixfe; delete line.XF;
142140
lastcell = cell;
@@ -365,7 +363,6 @@ function parse_workbook(blob, options/*:ParseOpts*/)/*:Workbook*/ {
365363
if(val.BIFFVer == 0 && val.dt == 0x1000) { opts.biff = 5; seen_codepage = true; set_cp(opts.codepage = 28591); }
366364
if(opts.biff == 8 && val.BIFFVer == 0 && val.dt == 16) opts.biff = 2;
367365
if(file_depth++) break;
368-
cell_valid = true;
369366
out = ((options.dense ? [] : {})/*:any*/);
370367

371368
if(opts.biff < 8 && !seen_codepage) { seen_codepage = true; set_cp(opts.codepage = options.codepage || 1252); }
@@ -462,7 +459,6 @@ function parse_workbook(blob, options/*:ParseOpts*/)/*:Workbook*/ {
462459
}
463460
} break;
464461
case 'ShrFmla': {
465-
if(!cell_valid) break;
466462
if(!options.cellFormula) break;
467463
if(last_cell) {
468464
/* TODO: capture range */

0 commit comments

Comments
 (0)