Parse DIF-esque CSV (fixes #3230 h/t @lowkeyfish)
This commit is contained in:
parent
36debb0eaa
commit
2d6c821261
@ -1138,3 +1138,17 @@ function read_wb_ID(d, opts) {
|
||||
}
|
||||
}
|
||||
|
||||
function read_wb_TABL(d, opts) {
|
||||
var o = opts || {}, OLD_WTF = !!o.WTF; o.WTF = true;
|
||||
try {
|
||||
var out = DIF.to_workbook(d, o);
|
||||
if(!out || !out.Sheets) throw "DIF bad workbook";
|
||||
var ws = out.Sheets[out.SheetNames[0]];
|
||||
if(!ws || !ws["!ref"]) throw "DIF empty worksheet";
|
||||
o.WTF = OLD_WTF;
|
||||
return out;
|
||||
} catch(e) {
|
||||
o.WTF = OLD_WTF;
|
||||
return PRN.to_workbook(d, opts);
|
||||
}
|
||||
}
|
||||
|
||||
Loadingâ¦
Reference in New Issue
Block a user
