Guidelines for Designing RTF Templates for Microsoft Excel 2007 Output

This section describes report features specific to designing RTF templates for Excel 2007 output (.xlsx).

It includes the following topics:

Create Multiple Sheets

By default, page breaks and section breaks specified in the RTF template create a new sheet in the output Excel workbook. You can control whether page breaks create a new sheet using the property xlsx-page-break-as-new-sheet. Set this property to false when you don't want page breaks in the RTF template to generate new sheets in the Excel workbook. A section break in the template will always create a new sheet in the Excel workbook output.

For information on setting properties in an RTF template, see Set Properties.

Specify a Sheet Name

You can specify which sheet to use in an input data phrase.

To specify a sheet name, use the following command in the template:

<?spreadsheet-sheet-name: xpath-expression?>

where xpath-expression is an XPath expression or a string constant.

For example, assume your template uses input data as follows:

 <?xml version="1.0" encoding="UTF-8" ?> 
      <CUSTOMER_NAME>Vgpsuwo Fjprpit</CUSTOMER_NAME> 

To generate a sheet name that shows the YEAR and STATE from the data (for example, "2005 ID") enter the following in a Publisher field in your template:

<?spreadsheet-sheet-name: {concat(.//YEAR, ' ',.//STATE)}?>

Ensure that your expression generates unique sheet names within the workbook.

Specify Number and Date Formatting

For Excel 2007 output format, Publisher doesn't apply any formatting for number and date.

Publisher saves the formatting mask and the actual value (date or number) into the XLSX output file. The formatting is handled by Microsoft Excel. For example:

  • If the Microsoft Windows Region and Language of the client computer is set to English (United States), then the numbers and dates are formatted in en-US locale in the Excel 2007 output file.

  • If the Microsoft Windows Region and Language of the client computer is set to French (France), then the numbers and dates in the same Excel 2007 output file are formatted in fr-FR locale.

Note also that Microsoft Excel 2007 output doesn't support some Oracle format masks. See Use the Oracle Format Mask for more information.