Lines Matching refs:v

95 function pad0(v,d){var t=""+v; return t.length>=d?t:fill('0',d-t.length)+t;}  argument
96 function pad_(v,d){var t=""+v;return t.length>=d?t:fill(' ',d-t.length)+t;} argument
97 function rpad_(v,d){var t=""+v; return t.length>=d?t:t+fill(' ',d-t.length);} argument
98 function pad0r1(v,d){var t=""+Math.round(v); return t.length>=d?t:fill('0',d-t.length)+t;} argument
99 function pad0r2(v,d){var t=""+v; return t.length>=d?t:fill('0',d-t.length)+t;} argument
101 function pad0r(v,d){if(v>p2_32||v<-p2_32) return pad0r1(v,d); var i = Math.round(v); return pad0r2(… argument
190 function general_fmt_int(v, opts) { return ""+v; } argument
194 function gfn2(v) { argument
195 var w = (v<0?12:11);
196 var o = gfn5(v.toFixed(12)); if(o.length <= w) return o;
197 o = v.toPrecision(10); if(o.length <= w) return o;
198 return v.toExponential(5);
200 function gfn3(v) { argument
201 var o = v.toFixed(11).replace(gnr1,".$1");
202 if(o.length > (v<0?12:11)) o = v.toPrecision(6);
214 return function general_fmt_num(v, opts) { argument
215 var V = Math.floor(Math.log(Math.abs(v))*Math.LOG10E), o;
216 if(V >= -4 && V <= -1) o = v.toPrecision(10+V);
217 else if(Math.abs(V) <= 9) o = gfn2(v);
218 else if(V === 10) o = v.toFixed(10).substr(0,12);
219 else o = gfn3(v);
223 function general_fmt(v, opts) { argument
224 switch(typeof v) {
225 case 'string': return v;
226 case 'boolean': return v ? "TRUE" : "FALSE";
227 case 'number': return (v|0) === v ? general_fmt_int(v, opts) : general_fmt_num(v, opts);
229 throw new Error("unsupported value in General format: " + v);
233 function parse_date_code(v,opts,b2) { argument
234 if(v > 2958465 || v < 0) return null;
235 var date = (v|0), time = Math.floor(86400 * (v - date)), dow=0;
237 var out={D:date, T:time, u:86400*(v-date)-time,y:0,m:0,d:0,H:0,M:0,S:0,q:0};
610 function eval_fmt(fmt, v, opts, flen) { argument
618 out[out.length] = {t:'G', v:'General'}; i+=7; break; property in out
621 out[out.length] = {t:'t', v:o}; ++i; break; property in out
623 out[out.length] = {t:t, v:w}; ++i; break; property in out
624 case '_': out[out.length] = {t:'t', v:" "}; i+=2; break; property in case
626 out[out.length] = {t:'T', v:v}; ++i; break; property in case
629 if(dt==null) { dt=parse_date_code(v, opts, fmt[i+1] === "2"); if(dt==null) return ""; }
630 out[out.length] = {t:'X', v:fmt.substr(i,2)}; lst = c; i+=2; break; property in out
637 if(v < 0) return "";
638 if(dt==null) { dt=parse_date_code(v, opts); if(dt==null) return ""; }
642 out[out.length] = {t:c, v:o}; lst = c; break; property in out
644 q={t:c, v:"A"}; property in case
645 if(dt==null) dt=parse_date_code(v, opts);
646 …if(fmt.substr(i, 3) === "A/P") { if(dt!=null) q.v = dt.H >= 12 ? "P" : "A"; q.t = 'T'; hr='h';i+=3…
647 …else if(fmt.substr(i,5) === "AM/PM") { if(dt!=null) q.v = dt.H >= 12 ? "PM" : "AM"; q.t = 'T'; i+=…
656 if(dt==null) { dt=parse_date_code(v, opts); if(dt==null) return ""; }
657 out[out.length] = {t:'Z', v:o.toLowerCase()}; property in out
664 out[out.length] = {t:'s', v:o}; break; property in out
669 out[out.length] = {t:'n', v:o}; break; property in out
672 q={t:c, v:o}; out[out.length] = q; lst = c; break; property in q
674 case '(': case ')': out[out.length] = {t:(flen===1?'t':c), v:c}; ++i; break; property in case
677 out[out.length] = {t:'D', v:o}; break; property in out
678 case ' ': out[out.length] = {t:c, v:c}; ++i; break; property in case
681 out[out.length] = {t:'t', v:c}; ++i; break; property in out
689 if((ssm=out[i].v.match(/\.0+$/))) ss0=Math.max(ss0,ssm[0].length-1);
694 case 'X': if(out[i].v === "B2");
697 if(bt < 1 && out[i].v.match(/[Hh]/)) bt = 1;
698 if(bt < 2 && out[i].v.match(/[Mm]/)) bt = 2;
699 if(bt < 3 && out[i].v.match(/[Ss]/)) bt = 3;
721 out[i].v = write_date(out[i].t.charCodeAt(0), out[i].v, dt, ss0);
727 …"t") && out[jj+1] != null && (out[jj+1].t === '?' || out[jj+1].t === "t" && out[jj+1].v === '/') ||
729 …c === 't' && (out[jj].v === '/' || '$€'.indexOf(out[jj].v) > -1 || out[jj].v === ' ' && out[jj+1] …
731 out[i].v += out[jj].v;
734 nstr += out[i].v;
736 case 'G': out[i].t = 't'; out[i].v = general_fmt(v,opts); break;
741 myv = (v<0&&nstr.charCodeAt(0) === 45 ? -v : v); /* '-' */
745 …for(i=0; i < out.length; ++i) if(out[i] != null && out[i].v.indexOf(".") > -1) { decpt = i; break;…
750 …if(jj>=out[i].v.length-1) { jj -= out[i].v.length; out[i].v = ostr.substr(jj+1, out[i].v.length); }
751 else if(jj < 0) out[i].v = "";
752 else { out[i].v = ostr.substr(0, jj+1); jj = -1; }
756 if(jj>=0 && lasti<out.length) out[lasti].v = ostr.substr(0,jj+1) + out[lasti].v;
762 j=out[i].v.indexOf(".")>-1&&i===decpt?out[i].v.indexOf(".")-1:out[i].v.length-1;
763 vv = out[i].v.substr(j+1);
765 if(jj>=0 && (out[i].v[j] === "0" || out[i].v[j] === "#")) vv = ostr[jj--] + vv;
767 out[i].v = vv;
771 if(jj>=0 && lasti<out.length) out[lasti].v = ostr.substr(0,jj+1) + out[lasti].v;
775 j=out[i].v.indexOf(".")>-1&&i===decpt?out[i].v.indexOf(".")+1:0;
776 vv = out[i].v.substr(0,j);
777 for(; j<out[i].v.length; ++j) {
780 out[i].v = vv;
787 myv = (flen >1 && v < 0 && i>0 && out[i-1].v === "-" ? -v:v);
788 out[i].v = write_num(out[i].t, out[i].v, myv);
792 for(i=0; i !== out.length; ++i) if(out[i] != null) retval += out[i].v;
798 function chkcond(v, rr) { argument
802 case "=": if(v == thresh) return true; break;
803 case ">": if(v > thresh) return true; break;
804 case "<": if(v < thresh) return true; break;
805 case "<>": if(v != thresh) return true; break;
806 case ">=": if(v >= thresh) return true; break;
807 case "<=": if(v <= thresh) return true; break;
811 function choose_fmt(f, v) { argument
816 if(typeof v !== "number") return [4, fmt.length === 4 || lat>-1?fmt[fmt.length-1]:"@"];
823 var ff = v > 0 ? fmt[0] : v < 0 ? fmt[1] : fmt[2];
828 …return chkcond(v, m1) ? [l, fmt[0]] : chkcond(v, m2) ? [l, fmt[1]] : [l, fmt[m1 != null && m2 != n…
832 function format(fmt,v,o) { argument
839 if(isgeneral(sfmt,0)) return general_fmt(v, o);
840 var f = choose_fmt(sfmt, v);
841 if(isgeneral(f[1])) return general_fmt(v, o);
842 if(v === true) v = "TRUE"; else if(v === false) v = "FALSE";
843 else if(v === "" || v == null) return "";
844 return eval_fmt(f[1], v, o, f[0]);
1288 function datenum(v, date1904) { argument
1289 if(date1904) v+=1462;
1290 var epoch = Date.parse(v);
1352 var m = tag.match(attregexg), j=0, w="", v="", i=0, q="", cc="";
1356 q = cc.substr(0,c); v = cc.substring(c+2, cc.length-1);
1358 if(j===q.length) z[q] = v;
1359 else z[(j===5 && q.substr(0,5)==="xmlns"?"xmlns":"")+q.substr(j+1)] = v;
1470 var v = x.replace(vtvregex,"").match(vtmregex);
1471 res.push({v:v[2], t:v[1]});
2395 keys(o).forEach(function(k){ keys(o[k]).forEach(function(v) { ct2type[o[k][v]] = k; }); }); argument
2445 var o = [], v;
2451 v = ct[w][0];
2453 'PartName': (v[0] == '/' ? "":"/") + v,
2459 ct[w].forEach(function(v) { argument
2461 'PartName': (v[0] == '/' ? "":"/") + v,
2467 (ct[t]||[]).forEach(function(v) { argument
2469 'PartName': (v[0] == '/' ? "":"/") + v,
2649 var v = parseVector(q.HeadingPairs);
2651 for(var i = 0; i !== v.length; ++i) {
2652 switch(v[i].v) {
2653 case "Worksheets": widx = j; p.Worksheets = +(v[++i].v); break;
2657 var parts = parseVector(q.TitlesOfParts).map(function(x) { return utf8read(x.v); });
2677 var v;
2679 case 'string': v = cp[f[1]]; break;
2680 case 'bool': v = cp[f[1]] ? 'true' : 'false'; break;
2682 if(v !== undefined) o[o.length] = (W(f[0], v));
3068 var v = blob.read_shift(1), t = blob.read_shift(1);
3069 return t === 0x01 ? v : v === 0x01;
7352 if(!s[addr]) s[addr] = {t:"stub",v:undefined};
7391 if(cell.v === undefined) return "";
7393 var oldt = cell.t, oldv = cell.v;
7395 case 'b': vv = cell.v ? "1" : "0"; break;
7396 case 'n': vv = ''+cell.v; break;
7397 case 'e': vv = BErr[cell.v]; break;
7399 if(opts.cellDates) vv = new Date(cell.v).toISOString();
7402 vv = ''+(cell.v = datenum(cell.v));
7406 default: vv = cell.v; break;
7408 var v = writetag('v', escapexml(vv)), o = {r:ref};
7419 v = writetag('v', ''+get_sst_id(opts.Strings, cell.v));
7424 if(cell.t != oldt) { cell.t = oldt; cell.v = oldv; }
7425 return writextag('c', v, o);
7474 if((cref=d.match(match_v))!== null && cref[1] !== '') p.v=unescapexml(cref[1]);
7478 if(tag.t === undefined && p.v === undefined) {
7487 case 'n': p.v = parseFloat(p.v); break;
7489 sstr = strs[parseInt(p.v, 10)];
7490 p.v = sstr.t;
7496 p.v = (p.v!=null) ? utf8read(p.v) : '';
7497 if(opts.cellHTML) p.h = p.v;
7502 if(cref !== null) { sstr = parse_si(cref[1]); p.v = sstr.t; } else p.v = "";
7504 case 'b': p.v = parsexmlbool(p.v); break;
7506 if(!opts.cellDates) { p.v = datenum(p.v); p.t = 'n'; }
7509 case 'e': p.w = p.v; p.v = RBErr[p.v]; break;
7744 case 'n': p.v = val[1]; break;
7745 case 's': sstr = strs[val[1]]; p.v = sstr.t; p.r = sstr.r; break;
7746 case 'b': p.v = val[1] ? true : false; break;
7747 case 'e': p.v = val[1]; p.w = BErr[p.v]; break;
7748 case 'str': p.t = 's'; p.v = utf8read(val[1]); break;
7760 p = {t:'s',v:undefined}; property in parse_ws_bin.ws_parse.p
7782 if(!s[addr]) s[addr] = {t:'s',v:undefined};
7918 if(cell.v === undefined) return "";
7921 case 'b': vv = cell.v ? "1" : "0"; break;
7922 case 'n': case 'e': vv = ''+cell.v; break;
7923 default: vv = cell.v; break;
7931 vv = get_sst_id(opts.Strings, cell.v);
8537 if(cell.t === 'e') { cell.w = cell.w || BErr[cell.v]; }
8540 if((cell.v|0) === cell.v) cell.w = SSF._general_int(cell.v);
8541 else cell.w = SSF._general_num(cell.v);
8543 else cell.w = SSF._general(cell.v);
8545 else cell.w = xlml_format(nf||"General", cell.v);
8575 cell.v = parsexmlbool(xml);
8579 cell.v = xml.indexOf("<") > -1 ? ss : cell.r;
8582 cell.v = (Date.parse(xml) - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
8583 if(cell.v !== cell.v) cell.v = unescapexml(xml);
8584 else if(cell.v >= 1 && cell.v<60) cell.v = cell.v -1;
8588 if(cell.v === undefined) cell.v=+xml;
8591 case 'Error': cell.t = 'e'; cell.v = RBErr[xml]; cell.w = xml; break;
8592 default: cell.t = 's'; cell.v = xlml_fixstr(ss); break;
8609 comment.t = comment.v;
8610 comment.v = comment.w = comment.ixfe = undefined;
8645 …if((!opts.sheetRows || opts.sheetRows > r) && cell.v !== undefined) cursheet[encode_col(c) + encod…
9180 var v = {};
9187 v.UserType = m;
9199 m = __lpstr(o, l); l += m.length === 0 ? 0 : 5 + m.length; v.Reserved1 = m;
9201 if((m = __readUInt32LE(o,l)) !== 0x71b2e9f4) return v;
9236 if(p.t === 'e') { p.w = p.w || BErr[p.v]; }
9239 if((p.v|0) === p.v) p.w = SSF._general_int(p.v);
9240 else p.w = SSF._general_num(p.v);
9242 else p.w = SSF._general(p.v);
9244 else p.w = SSF.format(fmtid,p.v, {date1904:date1904||false});
9250 return {v:val, ixfe:ixfe, t:t};
9449 temp_val = {ixfe: val.ixfe, XF: XFs[val.ixfe], v:val.val, t:'n'}; property in parse_workbook.temp_val
9454 temp_val = {ixfe: val.ixfe, XF: XFs[val.ixfe], v:val.val, t:val.t}; property in parse_workbook.temp_val
9459 temp_val = {ixfe: val.ixfe, XF: XFs[val.ixfe], v:val.rknum, t:'n'}; property in parse_workbook.temp_val
9466 temp_val= {ixfe:ixfe, XF:XFs[ixfe], v:val.rkrec[j-val.c][1], t:'n'}; property in parse_workbook.temp_val
9476 temp_val = {v:val.val, ixfe:val.cell.ixfe, t:val.tt}; property in parse_workbook.default
9487 temp_val = {v:last_formula.val, ixfe:last_formula.cell.ixfe, t:'s'}; property in parse_workbook.temp_val
11493 function safe_format_cell(cell, v) { argument
11494 if(cell.z !== undefined) try { return (cell.w = SSF.format(cell.z, v)); } catch(e) { }
11495 if(!cell.XF) return v;
11496 try { return (cell.w = SSF.format(cell.XF.ifmt||0, v)); } catch(e) { return ''+v; }
11499 function format_cell(cell, v) { argument
11502 if(v === undefined) return safe_format_cell(cell, cell.v);
11503 return safe_format_cell(cell, v);
11507 var val, row, range, header = 0, offset = 1, r, hdr = [], isempty, R, C, v;
11550 v = val.v;
11557 if(v !== undefined) {
11558 row[hdr[C]] = raw ? v : format_cell(val,v);
11613 else if(x.v === undefined) continue;
11614 else val = ""+x.v;