table read cells, table read cells seleted rows, table read cells in columns, table read cells selected rows in columns
This function looks for cells using the right-hand comparison expression across all or selected columns and across all or selected rows, read the contents into a set which is then returned as return value.
Indirect parameter passing is disabled
This function provides a table context for partial table specifications with table name and row number for selected function parameters
2-5
No. | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1. input |
string | target table name The target table must exist. | |||||||||||||||||||||||||||
Opt. 2. code |
expression :string |
Expression to select rows Applicable to table read cells selected rows and table read cells selected rows in columns: | |||||||||||||||||||||||||||
Opt 2. / 3. input |
table columns | Header names and/or column numbers See table columns as function parameters for general ruling for this parameter.
| |||||||||||||||||||||||||||
2 / 3 / 4 input |
string set |
values to compare Provide one string or multiple strings in a set to compare with the table contents. wildcards are supported if the strings are of type softquoted string. | |||||||||||||||||||||||||||
Opt. 3 / 4 / 5 input |
string set |
options One or multiple options may be applied.
Notes: |
Type | Description |
---|---|
set | Contents read A set containing all values read. e.g. { Content 1, Content 2, ... }. Empty set is returned in case of no matches. |
table initialize( t,
{ { City, State, Country },
{ Tuscon, AZ, United States },
{ Toronto, ON, Canada },
{ Missisauga, ON, Canada },
{ Zürich, ZH, Switzerland },
{ Lake Zurich, MI, United States } } );
table list(t);
c[] = table read cells( t, {} );
echo ("Nothing to look for: ", c[]);
c[] = table read cells( t, { canada, 'swit*' }, ignore case );
echo ("All countries except USA: ", c[]);
c[] = table read cells in columns( t, City, '*Z*rich*' );
echo ("All Cities sounding 'swiss', point on countries: ",c[]);
c[] = table read cells selected rows in columns( t, [Country]==Canada, State, ON, {once,left} );
echo ("1st Ontario match, point on city: ", c[]);
c[] = table read cells( t, Tuscon, left);
echo ("Empty set, as attempting to return coordinates beyond left side of table: ", c[]);
0 : City | State | Country
1 : Tuscon | AZ | United States
2 : Toronto | ON | Canada
3 : Missisauga | ON | Canada
4 : Zürich | ZH | Switzerland
5 : Lake Zurich | MI | United States
Nothing to look for: {}
All countries except USA: {'Canada','Canada','Switzerland'}
All Cities sounding 'swiss', point on countries: {'Zürich','Lake Zurich'}
1st Ontario match, point on city: {'Toronto'}
Empty set, as attempting to return coordinates beyond left side of table: {}