xlsgen > overview > Font |
Font options is one of the main and most efficient technique used to show a nice report table and underlines key elmeents out of an otherwise string of cells.
Font options are accessed by right-clicking on a cell and choosing Format Cell and then clicking on the Font tab. The most common font options are also provided in the formatting toolbar.
Among properties that can be affected are :
Font options are properties of the current style object. See formatting for more information. The regular programming interface for the font properties is the IXlsFont interface.
In order to produce the result above, you need to execute the following code :
VB code |
Dim style As IXlsStyle Set style = wksht.NewStyle style.Alignment.Horizontal = halign_left style.Font.Color = &HFF6666 style.Font.Italic = True style.Font.Size = 12 style.Font.Underlined = fontunderline_simple style.Apply wksht.Float(3, 2) = 5 ' put 5.00 in row 3, column 2 |
C# code |
IXlsStyle style = wksht.NewStyle(); style.Alignment.Horizontal = xlsgen.enumHorizontalAlignment.halign_left; style.Font.Color = 0xFF6666; style.Font.Italic = 1; style.Font.Size = 12; style.Font.Underlined = xlsgen.enumUnderline.fontunderline_simple; style.Apply(); wksht.set_Float(3, 2, 5.0); // put 5.00 in row 3, column 2 |
C/C++ code |
xlsgen::IXlsStylePtr style = wksht->NewStyle(); style->Alignment->Horizontal = xlsgen::halign_left; style->Font->Color = 0xFF6666; style->Font->Italic = TRUE; style->Font->Size = 12; style->Font->Underlined = xlsgen::fontunderline_simple; style->Apply(); wksht->Float[3][2] = 5.0; // put 5.00 in row 3, column 2 |
xlsgen documentation. © ARsT Design all rights reserved.