-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspreadsheet.1k.html
1 lines (1 loc) · 1023 Bytes
/
spreadsheet.1k.html
1
<body onload="var G=this,S=localStorage,I={};function F(a,d,b,c){for(c=d=0<=a?F(a/26-1)+(10+a%26|0).toString(36):'';b=a[d++];c=26*c+parseInt(b,36)-9);return c}function C(a){for(a in I)try{I[a].value=G[a]()||[S[a]]}catch(d){}}function L(a,d,b,c){b.innerHTML=c?'<input size=10 style=border:0>':'<center>'+(a||d);c&&(I[c=d+a]=b=b.firstChild,b.onblur=function(){C(S[c]=b.value)},b.onfocus=function(){b.value=[S[c]]},b.onkeyup=function(b){b.which-13||(S.y>(b=a+1)||!R(b))&&I[d+b].focus()},G[c]=function(a){with(Math)return/^=/.test(a=S[c]||0)?+eval(a.slice(1).replace(/([A-Z]+)(\d+)(?::([A-Z]+)(\d+))?/gi,function(a,b,d,c,e){a=[];e=e?e-d+1:1;for(c=e*(F(c||b)-(b=F(b)-1));c--;)a[c]=F(b+~~c/e)+(+d+c%e)+'()';return''+a})):a==+a?+a:a})}function R(a,d,b){b=G.T.insertRow(a);S.y=a+1;for(d=-1;99>d;)L(a,F(d),b.insertCell(++d),d*a)}for(var i=0,len=S.y||9;i<len;R(i++));C();function sum(){return[].reduce.call(arguments,function(a,d){return a+d})}function avg(){return sum.apply(0,arguments)/arguments.length}"><table id=T bgcolor=tan>