|
楼主 |
发表于 2009-1-28 22:39
|
显示全部楼层
再提供一些语法参考
/ evaluate:
====基本引用====
sheet:{((!#y),/:\:!#*y)cell[x]''y;} / calculate sheet
cell:{:[-3=4:z;.[`.W;x,y;:;eval[x;y;value parse 1_ z]]. x,y;z]} / calculate cell
value:{:[("R"~*x)|(*x)_in R;("VALUE";x);~4:x;@[x;1_!#x;_f];x]} / insert VALUE
eval:{:[4:z;leaf[x;y;z];(.*z)._f[refer[x;*z];y]'1_ z]} / evaluate expression
refer:{:[y~"OF";`$y 1;x]} / refer to sheet!
leaf:{(.:;r1c1[x;y];`$)[(|/'(*z)=(D;"R"))?1;z]} / evaluate leaf
rel:{:["["_in y;x+z;z-1]} / relative reference
AT:{@[y;0;:;x]} / sheet reference
VALUE:{:[~4:x 1;_f'+x;cell[*x;x 1]`.W[*x]. x 1]} / cell value
====单元引用====
r1c1:{(x;++rc'[^`.W x;y;(0,z?"C")_ z:(),z])} / "RxCy" -> cell
rc:{:[0=#z;!x;1=#z;y;rel[y;z].(0$z _dvl"RC[]")]} / z = R/C, R/Cn, R/C[n]
===引用运算====
INTERSECT:{(*x;x[1]@&x[1]_lin y 1)} / intersect cells
UNION:{(*x;?(x;y)[;1])} / union cells
RANGE:{(*x;,/,/:\:/x[1]+!:'1+*-':(x;y)[;1])} / cell range |
|