table style rows

Prev Next

Function Names

table style rows

Library

Style Library

Description

This function applies style and formatting to a row inside the table or the whole sheet

Call as: procedure

Restrictions

Don't forget to include 'Style Library' at the top of your program

Parameter count

5, 7, 9, etc.

Parameters

No.TypeDescription
1.
input
string Name fo existing table

2.
input
set containing numerals
numeral
Row numbers

Specify 1 or more row numbers.
Hint: Use table selected rows() to identify row numbers using a condition to apply on every row.

3.
input
string Formatting Coverage

See formatting coverages. Valid values are:

  • sheet: Covers entire sheet, even outside the table
  • table: Covers table, but sheet outside the table is not affected
  • body: Same functionality as with table, even when applying this function on row 0 (header row).

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.

Examples

       table load( t, "Examples\Cities.csv" );

       table style rows( t, 0, body, boldface, true, row height, 30 );

       // for table style rows, coverage values 'body' and 'table' work similarly.

       table style rows( t, table selected rows( t, [Country]==USA), body, fill color, gray 15,
               top border, { thick, blue }, bottom border, { thick, blue },
               left border, { thick, red }, right border, { thick, red } );

       // Here: Sheet wide coverage when viewing files with Excel
       table style rows( t, table selected rows( t, [Country]==ITA), sheet, fill color, lemon, italic, true );

       table save( t, "Images/Style_Function_table_style_rows.html", HTML );
       table save( t, "Images/Style_Function_table_style_rows.xls", EXCEL );
       table save excel file( t, Contents, "Images/Style_Function_table_style_rows.xlsx" );
       echo("Done.");

Output

    Saved table(s) to EXCEL file 'Images/Style_Function_table_style_rows.xlsx' containing 1 sheets.

Done.
Try it yourself: Open LIB_Function_table_style_rows.b4p in B4P_Examples.zip. Decompress before use.

Viewing the Results:

Test Click on the file name view the result: Style_Function_table_style_rows.html.
Test Click on the file name open the file with Excel XML 2003: Style_Function_table_style_rows.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_rows.xlsx (Excel .xlsx format).

See also

table style table
table style columns
table style cells