<!-- An example that shows how to designate styles and fonts before outputing your data (Global Styles). This removes the duplication of style information at each cell and makes code maintenance much easier. --> <cf_xls_workbook SaveAsName="generate5.xls" > <cf_xls_font id="MyHeaders" family="Arial" size="18" weight="Bold" /> <cf_xls_font id="MyLabels" family="Forte" size="14" weight="normal" /> <cf_xls_font id="MyTotals" family="Arial" size="14" weight="normal" /> <!-- Global styles are defined with the cf_xls_style tag. Using global styles simplifies the defining of cells and their styles. Simply defined your style with the tag and give it an ID. Then in the cell(see below) put the styleID="the ID of the global style" and that cell will be rendered with that global style. --> <cf_xls_style id="MyHeaderRow" FontID="MyHeaders" Align="center" WrapText="No" Border="Medium" /> <cf_xls_style id="MyLabelStyle" FontID="MyLabels" Align="left" WrapText="No" RightBorder="Medium" /> <cf_xls_style id="MyTotalsStyle" FontID="MyTotals" Align="right" WrapText="No" dataFormat="0.00" /> <cf_xls_sheet Name="Bills" columnWidths="25,25"> <cf_xls_row> <!-- Here we set the style to be a global style by using the styleID attribute. --> <cf_xls_cell styleID="MyHeaderRow" >Bill Name</cf_xls_cell> <cf_xls_cell styleID="MyHeaderRow" >Amount</cf_xls_cell> </cf_xls_row> <cf_xls_row> <cf_xls_cell styleID="MyLabelStyle">Gas</cf_xls_cell> <cf_xls_cell type="number" styleID="MyTotalsStyle">15.21</cf_xls_cell> </cf_xls_row> <cf_xls_row> <cf_xls_cell styleID="MyLabelStyle">Telephone</cf_xls_cell> <cf_xls_cell type="number" styleID="MyTotalsStyle">45.11</cf_xls_cell> </cf_xls_row> <cf_xls_row> <cf_xls_cell styleID="MyLabelStyle">Grocery</cf_xls_cell> <cf_xls_cell type="number" styleID="MyTotalsStyle">98.77</cf_xls_cell> </cf_xls_row> <cf_xls_row> <cf_xls_cell styleID="MyLabelStyle">Electric</cf_xls_cell> <cf_xls_cell type="number" styleID="MyTotalsStyle">66.99</cf_xls_cell> </cf_xls_row> </cf_xls_sheet> </cf_xls_workbook>