deno.land / x / sheetjs@v0.18.3 / bits / 65_fods.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* Part 3 TODO: actually parse formulae */function ods_to_csf_formula(f/*:string*/)/*:string*/ { if(f.slice(0,3) == "of:") f = f.slice(3); /* 5.2 Basic Expressions */ if(f.charCodeAt(0) == 61) { f = f.slice(1); if(f.charCodeAt(0) == 61) f = f.slice(1); } f = f.replace(/COM\.MICROSOFT\./g, ""); /* Part 3 Section 5.8 References */ f = f.replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g, function($$, $1) { return $1.replace(/\./g,""); }); /* TODO: something other than this */ f = f.replace(/\[.(#[A-Z]*[?!])\]/g, "$1"); return f.replace(/[;~]/g,",").replace(/\|/g,";");}
function csf_to_ods_formula(f/*:string*/)/*:string*/ { var o = "of:=" + f.replace(crefregex, "$1[.$2$3$4$5]").replace(/\]:\[/g,":"); /* TODO: something other than this */ return o.replace(/;/g, "|").replace(/,/g,";");}
function ods_to_csf_3D(r/*:string*/)/*:[string, string]*/ { var a = r.split(":"); var s = a[0].split(".")[0]; return [s, a[0].split(".")[1] + (a.length > 1 ? (":" + (a[1].split(".")[1] || a[1].split(".")[0])) : "")];}
function csf_to_ods_3D(r/*:string*/)/*:string*/ { return r.replace(/\./,"!");}

sheetjs

Version Info

Tagged at
2 years ago