summaryrefslogtreecommitdiffstats
path: root/test/20-table-reference-01.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/20-table-reference-01.txt')
-rw-r--r--test/20-table-reference-01.txt37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/20-table-reference-01.txt b/test/20-table-reference-01.txt
new file mode 100644
index 0000000..0e99185
--- /dev/null
+++ b/test/20-table-reference-01.txt
@@ -0,0 +1,37 @@
+%% Basic table reference test. Set C3:D9 to be a table range with 2 columns
+%% 'Category' and 'Value'.
+%mode init
+C3@Category
+C4@A
+C5@B
+C6@C
+C7@D
+C8@E
+C9@Total
+D3@Value
+D4:1
+D5:2
+D6:3
+D7:4
+D8:5
+D9=SUBTOTAL(109,[Value])
+E1=SUM(Table1[Value])
+E2=COUNTA(Table1[#Headers])
+E3=COUNTA(Table1[[#Headers],[Category]])
+E4=COUNTA(Table1[[#Headers],[#Data],[Category]])
+%mode table
+name=Table1
+range=C3:D9
+columns=Category,Value
+totals-row-count=1
+%push
+%calc
+%mode result
+D9=15
+E1=15
+E2=2
+E3=1
+E4=6
+%check
+%exit
+