DSV Field Separator override [ci skip]

This commit is contained in:
AndrewGlago 2021-11-09 00:31:56 +00:00
parent 29e3bb4c1f
commit ef21e2bea2
3 changed files with 5 additions and 0 deletions

@ -873,6 +873,7 @@ var PRN = (function() {
}
else sep = guess_sep(str.slice(0,1024));
}
else if(o && o.FS) sep = o.FS;
else sep = guess_sep(str.slice(0,1024));
var R = 0, C = 0, v = 0;
var start = 0, end = 0, sepcc = sep.charCodeAt(0), instr = false, cc=0, startcc=str.charCodeAt(0);

@ -26,6 +26,7 @@ The exported `read` and `readFile` functions accept an options argument:
|`sheets` | | If specified, only parse specified sheets ** |
|`PRN` | false | If true, allow parsing of PRN files ** |
|`xlfn` | false | If true, preserve `_xlfn.` prefixes in formulae ** |
|`FS` | | DSV Field Separator override |
- Even if `cellNF` is false, formatted text will be generated and saved to `.w`
- In some cases, sheets may be parsed even if `bookSheets` is false.

3
types/index.d.ts vendored

@ -163,6 +163,9 @@ export interface ParsingOptions extends CommonOptions {
/** Override default date format (code 14) */
dateNF?: string;
/** Field Separator ("Delimiter" override) */
FS?: string;
/**
* If >0, read the first sheetRows rows
* @default 0