table substitute horizontally, table substitute horizontally selected rows
These functions are the counterparts to table fill horizontally() and table fill horizontally selected rows(). Here, repetitions in rows will be replaced by blanks or substitute symbols of choice (e.g. ", see above, ditto, etc.)
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
1-6
No. | Type | Description |
---|---|---|
1. input |
string | Name of existing table |
Opt. 2. code |
expression :string |
Expression to select rows Applicable to table substitute horizontally selected rows only: |
Opt 2. / 3. input |
table column | Starting column to repeat See table columns as function parameters for general ruling for this parameter.
|
Opt 3. / 4. input |
table column | Ending column to repeat See table columns as function parameters for general ruling for this parameter.
|
Opt. 4. / 5. input |
string | Substitution string The substitution string specified here will be used to replace repeated contents. Good examples: '', '...', 'same'. Default value: '' (blank) |
Opt. 5. / 6. input |
string | Direction Following values are supported: left and right for repeating contents in left resp. right direction. Default value: right |
table initialize( a,
{ { Last Name, Jan, Feb, Mar, Apr, May, June },
{ Miller, 5, 6, 15, 15, 15, 25 },
{ Muller, '', 6, 6, 6, 14, 14 },
{ Tanner, 7, 7, 17, 17, 17, 17 },
{ Gerber, '', 9, 10, 11, 12, 12 } } );
echo("Original table:");
table list(a);
table copy table ( a, b );
echo("Substitte from left to right");
table substitute horizontally ( b, Jan, -1, '...' );
table list(b);
echo("Substitute from right to left ");
table substitute horizontally ( a, Jan, -1, '...', left );
table list(a);
Original table:
0 : Last Name | Jan | Feb | Mar | Apr | May | June
1 : Miller | 5 | 6 | 15 | 15 | 15 | 25
2 : Muller | | 6 | 6 | 6 | 14 | 14
3 : Tanner | 7 | 7 | 17 | 17 | 17 | 17
4 : Gerber | | 9 | 10 | 11 | 12 | 12
Substitte from left to right
0 : Last Name | Jan | Feb | Mar | Apr | May | June
1 : Miller | 5 | 6 | 15 | ... | ... | 25
2 : Muller | | 6 | ... | ... | 14 | ...
3 : Tanner | 7 | ... | 17 | ... | ... | ...
4 : Gerber | | 9 | 10 | 11 | 12 | ...
Substitute from right to left
0 : Last Name | Jan | Feb | Mar | Apr | May | June
1 : Miller | 5 | 6 | ... | ... | 15 | 25
2 : Muller | | ... | ... | 6 | ... | 14
3 : Tanner | ... | 7 | ... | ... | ... | 17
4 : Gerber | | 9 | 10 | 11 | ... | 12