Note that the DEPT_TOTAL_SALARY element in the data has these attributes defined: In this example, a border style and an underline style are applied to the DEPT_TOTAL_SALARY field shown in the Excel template.įor this example, the following data is used.
To apply a style in a template, the style value must be present in the data. You can have multiple underline styles defined for a single cell. In the Excel template, you have defined a field with the XDO Defined Name XDO_?TYPE?, which is populated based on the string returned from code performed in the subtemplate, as shown in the following figure: This subtemplate evaluates the value of a parameter named pPayType and based on the value, return a string that indicates the payment type:
Names each sheet using the value of DEPARTMENT_NAME concatenated with "-" and the count of employees in the DEPT group. The expression can reference a value for an element or attribute in the XML data, or you can use the string operation on those elements to define the final sheet name. In Column B enter the XSL expression to derive the new sheet name. Use XDO_SHEET_NAME_? to define the name to apply to the sheets. For more information, see Preprocessing the Data Using an XSL Transformation (XSLT) File. To preprocess the data, define the transformation in an XSLT file, then specify this file in the Preprocess XSLT File field of the header section of the XDO _METADATA sheet. If the data is flat, then you cannot use this command unless you first preprocess the data to create the desired hierarchy. The example creates a new sheet for each occurrence of in the data. XDO_SHEET_? must refer to an existing high-level node in the XML data.