table process cells, table process all cells, table process cells selected rows
Slightly different from the the functions table process() and table process selected rows(), the specified
statements are applied on every existing table cell (from left to right) and not only once per row. The statements for processing the data
in every cell are provided as function parameters. For this function, the enabled partial table specifications also
includes referencing the current column number by simply specifying a '.' (point) and you can use the function col() to retrieve
the current column number.
table process all cells will also process all elements in row 0 (header row), too, whereas the other funnctions skip the header row.
This feature allows simple formulation of instructions without writinng a 2-dimensional loop.
The closest relative of this function is the combination of for all table rows() and for all table columns() which describe two nested loops
Hint: If the table contains rows with different widths and you want to apply this function to the full table row width as provided in the header
row or longest row, then use the function table fit() first in order to prepare the table to your needs.
Indirect parameter passing is disabled
This function provides a table context for partial table specifications with table name, row number and column number for selected function parameters
2-4
No. | Type | Description |
---|---|---|
1. input |
string | Name of existing table |
Opt. 2. code |
expression :string |
Expression to select rows Applicable to table process selected rows only: |
2. / 3. code |
statements :string |
Statements (applicable where rows are selected) table process cells: The statements provided will be executed for every row. |
4. code |
statements :string |
Statements (otherwise) table process cells: Not applicable. This function accepts 3 parameters only.
table process cells selected rows: The statements provided will be executed for every cell in every row where the condition calculated for that row returned false. |
Type | Description |
---|---|
numeral | Number of cells processed With table process selected rows, the number of selected rows (and processed with statements from 3rd function parameter) are counted. |
table initialize ( animals, { {Animal, Group, Special abilities},
{ parakeet, bird, can fly }, { moose, mammal }, { ape, mammal, quite samrt }, { sparrow, bird } , { trout, fish }, { bass, fish },
{ canary, bird }, { penguin, bird }, { beluga, mammal, submarine sonar} } );
table process cells ( animals, [.] += '!' ); // Add an exclamation to text in every existing cell
table process cells selected rows ( animals, [Group]=='mammal!', [.] = +[.] ); // Convert all contents (except header row) to upper case.
table list ( animals );
0 : Animal | Group | Special abilities
1 : parakeet! | bird! | can fly!
2 : MOOSE! | MAMMAL! |
3 : APE! | MAMMAL! | QUITE SAMRT!
4 : sparrow! | bird! |
5 : trout! | fish! |
6 : bass! | fish! |
7 : canary! | bird! |
8 : penguin! | bird! |
9 : BELUGA! | MAMMAL! | SUBMARINE SONAR!
table process
table process selected rows
table process columns
table process selected columns
table process cells in columns
table process cells selected rows in columns
table manipulate