hyperformula
hyperformula copied to clipboard
Named Expressions: Structured References keywords (aka Stage 4)
Description
This is a part of the #126 Named Expressions Epic.
Goals
Finish the Structured References syntax to the point of full compatiblity with XL. It should be possible to export/import or copy/paste data between the two engines and get the same results.
- [ ] Parse and understand special keywords
- [ ] Range, union and intersection support for structured references
- [ ] Keep the whitespace
Keywords
A row can also be one of those helpful keywords:
[#All] will return all rows: data, headers and totals.
[#This Row] or [@] or @[ColumnName] relative to the row (default when row is omitted).
[#Headers] for the header row.
[#Totals] for summary/totals row.
[#Data] for data rows without headers and totals.
Reference operators
Reference operators can be applied (syntax depends on configuration #58). Use additional brackets around expressions with operators [ ].
Range: =Table[[Column 1]:[Column 2]] same as A2:B7 (colon)
Union: =Table[[Column 1]:[Column 2]],Table[[Column 4]:[Column 5]] same as A2:B7, D2:E7 (comma)
Intersection: =Table[[Column 1]:[Column 2]] Table[[Column 4]:[Column 5]] same as A2:B7 D2:E7 (space). Note: row and column is an union: [Row] [Column] but we can omit it
Whitespace should be preserved:
After the first left bracket ([ )
Preceding the last right bracket ( ]).
After a comma (, )