Skip to content

Commit bd26e17

Browse files
fix SheetJS#2752 sheet_to_csv skips first blank line with blankrows: true option
sheet_to_csv skips first blank line with blankrows: true option
1 parent 0de9479 commit bd26e17

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: bits/27_csfutils.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,11 @@ function sheet_add_aoa(_ws/*:?Worksheet*/, data/*:AOA*/, opts/*:?any*/)/*:Worksh
173173
}
174174
}
175175
}
176-
if(range.s.c < 10000000) ws['!ref'] = encode_range(range);
176+
if (range.s.c < 10000000) {
177+
if (range.s.c > _C) range.s.c = _C;
178+
if (range.s.r > _R) range.s.r = _R;
179+
ws['!ref'] = encode_range(range);
180+
}
177181
return ws;
178182
}
179183
function aoa_to_sheet(data/*:AOA*/, opts/*:?any*/)/*:Worksheet*/ { return sheet_add_aoa(null, data, opts); }

0 commit comments

Comments
 (0)