table style columns
Style Library
This function applies style and formatting to a column inside the table or the whole sheet
Don't forget to include 'Style Library' at the top of your program
5, 7, 9, etc.
No. | Type | Description |
---|---|---|
1. input |
string | Name fo existing table |
2. input |
table columns | Table columns to format Specify 1 or more columns using header names and/or column numbers. Negative indexing is supported. |
3. input |
string | Formatting Coverage See formatting coverages. Valid values are:
|
4, 6, ... input |
string | Generic Attribute Name See generic attribute names for available names. |
5, 7, ... input |
string | Generic Attribute Value See generic attribute values for valid values. Different rules apply for the different generic attribute names. |
table load( t, "Examples\Cities.csv" );
table style columns( t, {City,"State/Province"}, sheet, boldface, true, text color, burgundy, fill color, champagne );
table style columns( t, Country, table, italic, true, fill color, { 224, 229, 244 } );
table style columns( t, {-3,-1}, body, fill color, lemon );
// Number format is supported in Excel only
table style columns( t, {Inhabitants,"Alt. (m)"},body, horizontal align, right, number format, "#,##0" );
table save( t, "Images/Style_Function_table_style_columns.xls", EXCEL );
table save excel file( t, Contents, "Images/Style_Function_table_style_columns.xlsx" );
// How to apply number formats in HTML for browsers
table process ( t, [Inhabitants] = str([Inhabitants], '#,##0', local) );
table process selected rows( t, ['Alt. (m)'] != '', ['Alt. (m)'] = str(['Alt. (m)'] , '#,##0', local) );
table style columns( t, {Inhabitants,"Alt. (m)"},body, type, string );
table save( t, "Images/Style_Function_table_style_columns.html", HTML );
echo("Done.");
Saved table(s) to EXCEL file 'Images/Style_Function_table_style_columns.xlsx' containing 1 sheets.
Done.
Test Click on the file name view the result: Style_Function_table_style_columns.html.
Test Click on the file name open the file with Excel XML 2003: Style_Function_table_style_columns.xls (Excel XML 2003 format - confirm the message box query).
Test Click on the file name open the file with Excel (.xlsx) : Style_Function_table_style_columns.xlsx (Excel .xlsx format).