<!-- An example that shows how to set default styles and fonts for an entire workbook. --> <cf_xls_workbook SaveAsName="generate4.xls"> <!-- A font defined with the ID of "default" becomes the font for all cells that do not specify the font --> <cf_xls_font id="default" family="Times New Roman" size="15" weight="normal" /> <!-- The style to use for all cells which do not have a specified style or styleID is set by creating a cf_xls_style tag with the ID of "default". --> <cf_xls_style id="default" align="center" valign="top" backgroundColor="red" /> <cf_xls_sheet Name="Sheet1" columnwidths="40,20,10,10"> <cf_xls_row> <cf_xls_cell>Cell 1</cf_xls_cell> <cf_xls_cell>Cell 2</cf_xls_cell> <cf_xls_cell>Cell 3</cf_xls_cell> <cf_xls_cell>Cell 4</cf_xls_cell> </cf_xls_row> <cf_xls_row> <cf_xls_cell>A New Row</cf_xls_cell> <!-- If the styleID in not specified for a cell the cell uses the default style. If the cell has the style attribute defined, the cell uses the default style and the characteristics described in the style attribute are overridden. --> <cf_xls_cell style="backgroundcolor:white">Cell 2</cf_xls_cell> <cf_xls_cell font="size=12" style="backgroundcolor:white">Cell 3</cf_xls_cell> <cf_xls_cell>Cell 4</cf_xls_cell> </cf_xls_row> <cf_xls_row> <cf_xls_cell>A Third Row</cf_xls_cell> <cf_xls_cell>Cell 2</cf_xls_cell> <cf_xls_cell>Cell 3</cf_xls_cell> <cf_xls_cell>Cell 4</cf_xls_cell> </cf_xls_row> </cf_xls_sheet> </cf_xls_workbook>