Skip to content

Commit ef21e2b

Browse files
committed
DSV Field Separator override [ci skip]
1 parent 29e3bb4 commit ef21e2b

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

bits/40_harb.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,7 @@ var PRN = (function() {
873873
}
874874
else sep = guess_sep(str.slice(0,1024));
875875
}
876+
else if(o && o.FS) sep = o.FS;
876877
else sep = guess_sep(str.slice(0,1024));
877878
var R = 0, C = 0, v = 0;
878879
var start = 0, end = 0, sepcc = sep.charCodeAt(0), instr = false, cc=0, startcc=str.charCodeAt(0);

docbits/80_parseopts.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The exported `read` and `readFile` functions accept an options argument:
2626
|`sheets` | | If specified, only parse specified sheets ** |
2727
|`PRN` | false | If true, allow parsing of PRN files ** |
2828
|`xlfn` | false | If true, preserve `_xlfn.` prefixes in formulae ** |
29+
|`FS` | | DSV Field Separator override |
2930

3031
- Even if `cellNF` is false, formatted text will be generated and saved to `.w`
3132
- In some cases, sheets may be parsed even if `bookSheets` is false.

types/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ export interface ParsingOptions extends CommonOptions {
163163
/** Override default date format (code 14) */
164164
dateNF?: string;
165165

166+
/** Field Separator ("Delimiter" override) */
167+
FS?: string;
168+
166169
/**
167170
* If >0, read the first sheetRows rows
168171
* @default 0

0 commit comments

Comments
 (0)