summaryrefslogtreecommitdiffstats
path: root/test/21-named-exp-worksheet-01.txt
blob: 0356c54827cfd4f27218c7755ff2be46e7f0a370 (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
%% Named expression in sheet scope.
%% Sizes of the equally named sheet-local ranges are intentionally different,
%% to easily test whether the correct range is picked on each sheet.
%% --------------------------------------------------------------------------
%mode session
row-limit:1000
column-limit:100
insert-sheet:Sheet1
insert-sheet:Sheet2
current-sheet:Sheet1
display-sheet-name:true
%% --------------------------------------------------------------------------
%mode init
A1:1
A2:2
A3:3
A4:4
A5:5
B1:6
B2:7
B3:8
B4:9
B5:10
B7=SUM(MyLocalRange)
%% --------------------------------------------------------------------------
%mode session
current-sheet:Sheet2
%% --------------------------------------------------------------------------
%mode init
A1:10
A2:20
A3:30
A4:40
A5:50
B1:60
B2:70
B3:80
B4:90
B5:100
B7=SUM(MyLocalRange)
%% --------------------------------------------------------------------------
%mode named-expression
name=MyLocalRange
scope=Sheet1
expression=Sheet1!$A$1:$A$5
origin=Sheet1!$A$1
%push
%% --------------------------------------------------------------------------
%mode named-expression
name=MyLocalRange
scope=Sheet2
expression=Sheet2!$A$4:$B$5
origin=Sheet2!$A$1
%push
%% --------------------------------------------------------------------------
%calc
%% --------------------------------------------------------------------------
%mode result
Sheet1!B7=15
Sheet2!B7=280
%check
%% --------------------------------------------------------------------------
%mode edit
Sheet1!A5@some text
Sheet2!B4@other text
%recalc
%% --------------------------------------------------------------------------
%mode result
Sheet1!B7=10
Sheet2!B7=190
%check
%exit