table fill horizontally, table fill horizontally selected rows
In various tables, contents are mentioned in only one column and the columns to the right (or left) are kept blank even though the same contents are assumed. This function will repeat the contents accordingly.
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 fill 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 | Strings representing repetition Provide one string with matching pattern. This one will apply to all rows and columns.
Soft quoted strings allow use of wildcard symbols in order to compare for different strings, e.g. 'see above*,' covers begins with 'see above'
and equals to blanks (note the comma at the end).
|
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, '', 15, '', '', 25 },
{ Muller, '', '', 6, '', 14, '' },
{ Tanner, 7, same, 17, same, same, '' },
{ Gerber, '', same, 0, 10, 11, 12 } } );
echo("Original table:");
table list(a);
table copy table ( a, b );
echo("Fill from left to right");
table fill horizontally ( b, Jan, -1, 'same,' );
table list(b);
echo("Fill from right to left ");
table fill horizontally ( a, Jan, -1, 'same,', left );
table list(a);
Original table:
0 : Last Name | Jan | Feb | Mar | Apr | May | June
1 : Miller | 5 | | 15 | | | 25
2 : Muller | | | 6 | | 14 |
3 : Tanner | 7 | same | 17 | same | same |
4 : Gerber | | same | 0 | 10 | 11 | 12
Fill from left to right
0 : Last Name | Jan | Feb | Mar | Apr | May | June
1 : Miller | 5 | 5 | 15 | 15 | 15 | 25
2 : Muller | | | 6 | 6 | 14 | 14
3 : Tanner | 7 | 7 | 17 | 17 | 17 | 17
4 : Gerber | | same | 0 | 10 | 11 | 12
Fill from right to left
0 : Last Name | Jan | Feb | Mar | Apr | May | June
1 : Miller | 5 | 15 | 15 | 25 | 25 | 25
2 : Muller | 6 | 6 | 6 | 14 | 14 |
3 : Tanner | 7 | 17 | 17 | same | same |
4 : Gerber | 0 | 0 | 0 | 10 | 11 | 12