table format numbers
All numbers in specified columns of the specified table will be identified and formatted according to specifications provided. The mechanism is the same as in the function str() where numbers are provided. Non-numeric data, e.g. text, dates and blank fields, remain unchanged.
Indirect parameter passing is disabled
3-4
No. | Type | Description |
---|---|---|
1. input |
string | Name of existing table |
2 input |
table columns | Header names and/or column numbers The specified table columns will be considered for formatting.
|
3. input |
string | Formatting template Refer to section on numeral to string conversion and formatting |
Opt 4. input |
string | Locale (formatting option) Refer to section on numeral to string conversion and formatting, to specify a valid locale, |
Opt 5. input |
string | Placeholder symbol Refer to section on numeral to string conversion and formatting, to specify a placeholder symbol. |
table initialize ( t, { { Product, Price per 100kg, Discount },
{ Apples, 45.5, 0.05 },
{ Oranges, 90.5, 0.10 },
{ Durian, 1240, none } } );
table format numbers( t, Price per 100kg, "'EUR '?,??0.00", de_DE, '*' );
table format numbers( t, Discount, "?0.00 %" );
table list ( t );
0 : Product | Price per 100kg | Discount
1 : Apples | EUR ***45,50 | 5,00 %
2 : Oranges | EUR ***90,50 | 10,00 %
3 : Durian | EUR 1.240,00 | none