- Microsoft Excel Database Template
- Microsoft Excel App Download Pc
- Microsoft Excel Test Script Template Download Free Apps Downloads
- Microsoft Excel Updates Free Download
Oracle Fusion Middleware Report Designer's Guide for Oracle Business Intelligence Publisher
Release 11g (11.1.1)
Part Number E13881-02
This chapter covers the following topics:
Uat Testing TemplateUat Template Excel. Free Sample,Example & Format Uat Template Excel y5cJl. 10 Test Case Templates – Free Sample Example FormatUat Template Excel Uat Testing TemplateUat Template Excel IEEE Sample Test Plan TemplateUat Template Excel Dashboard User Acceptance TestingUat Template Excel. We had our user department colleagues add their test scenarios (with our help obviously), separate for functional and integration test. Then we would upload the test cases to our testing tool, but you can also have testers enter their results directly in Excel. You can use the template both for manual and automated testing, obviously.
Introduction
An Excel template is a report layout that you design in Microsoft Excel for retrieving and formatting your enterprise reporting data in Excel. Excel templates provide a set of special features for mapping data to worksheets and for performing additional processing to control how your data is output to Excel workbooks.
Features of Excel Templates
With Excel templates you can:
Define the structure for your data in Excel output
Split hierarchical data across multiple sheets and dynamically name the sheets
Create sheets of data that have master-detail relationships
Use native XSL functions in your data to manipulate it prior to rendering
Use native Excel functionality
Limitations of Excel Templates
The following are limitations of Excel templates:
For reports that split the data into multiple sheets, images are not supported. If the template sheet includes images, when the data is split into multiple sheets, the images will show only on the first sheet.
There is no tool to facilitate the markup of the template with BI Publisher tags; all tags must be manually coded. Some features require the use of XSL and XSL Transformation (XSLT) specifications
Prerequisites
Following are prerequisites for designing Excel templates:
Microsoft Excel 2003 or later. The template file must be saved as Excel 97-2003 Workbook binary format (*.xls).
To use some of the advanced features, the report designer will need knowledge of XSL and XSLT.
The report data model has been created.
Supported Output
Excel templates generate Excel binary (.xls) output only.
Desktop Tools
BI Publisher provides a downloadable add-in to Excel that enables you to preview your template with sample data. This facilitates design by enabling you to test and edit your template without having to upload it to the BI Publisher catalog first.
The Template Builder for Excel is installed automatically when you install the Template Builder for Word. The tools can be downloaded from the Home page of Oracle Business Intelligence Publisher or Oracle Business Intelligence Enterprise Edition, as follows:
Under the Get Started region, click Download BI Publisher Tools.
Sample Excel Templates
The Template Builder includes sample Excel templates.
To access the samples from a Windows desktop:
Click Start, then Programs, then Oracle BI Publisher Desktop, then Samples, then Excel.
This will launch the folder that contains the Excel sample templates.
Concepts
Similar to RTF template design, Excel template design follows the paradigm of mapping fields from your XML data to positions in the Excel worksheet. Excel templates make use of features of Excel in conjunction with special BI Publisher syntax to achieve this mapping. In addition to direct mapping of data elements, Excel templates also utilize a special sheet (the XDO_METADATA sheet) to specify and map more complex formatting instructions.
Microsoft Excel Database Template
Identifying Data Field Placeholders and Groups
Excel templates use named cells and groups of cells to enable BI Publisher to insert data elements. Cells are named using BI Publisher syntax to establish the mapping back to the XML data. The cell names are also used to establish a mapping within the template between the named cell and calculations and formatting instructions that are defined on the XDO_METADATA sheet.
Your template content and layout must correspond to the content and hierarchy of the XML data file used as input to your report. Each group of repeating elements in your template must correspond to a parent-child relationship in the XML file. If your data is not structured to match the desired layout in Excel it is possible to regroup the data using XSLT preprocessing or the grouping functions. However, for the best performance and least complexity it is recommended that the data model be designed with the report layout in mind.
Note: See Preprocessing the Data Using an XSL Transformation (XSLT) File and Grouping Functions for more information about these options.
Use of Excel Defined Names
The Excel defined names feature is used to identify data fields and repeating elements. A defined name in Excel is a name that represents a cell, range of cells, formula, or constant value.
Tip: To learn more about defined names and their usage in Microsoft Excel 2007, see the Microsoft help topic: 'Define and use names in formulas.'
The defined names used in your Excel template must use the syntax described in this chapter, as well as follow the Microsoft guidelines described in the Microsoft Excel help document. Note that BI Publisher defined names are within the scope of the template sheet.
About the XDO_ Defined Names
The BI Publisher defined names are Excel defined names identified by the prefix 'XDO_'. Marking up the placeholders in the template files creates the connection between the position of the placeholders in the template and the XML data elements, and also maintains the ability to dynamically grow data ranges in the output reports, so that these data ranges can be referenced by other formula calculations, charts, and macros.
Using Native Excel Functions
You can use the XDO_ defined names in Excel native formulas as long as the defined names are used in a simple table. When a report is generated, BI Publisher will automatically adjust the region ranges for those named regions so that the formulas calculate correctly.
However, if you create nested groups in your template, the cells generated in the final report within the grouping can no longer be properly associated to the correct name. In this case, the use of XDO_ defined names with native Excel functions cannot be supported.
About the XDO_METADATA Sheet
Each Excel template requires a sheet within the template workbook called 'XDO_METADATA'. Use this sheet to identify your template to BI Publisher as an Excel template. This sheet is also used to specify calculations and processing instructions to perform on fields or groups in the template. BI Publisher provides a set of functions to provide specific report features. Other formatting and calculations can be expressed in XSLT.
It is recommended that you hide the XDO_METADATA sheet before you upload your completed template to the BI Publisher catalog. This will prevent report consumers from seeing it in the final report output.
Note: For more information see Format of the XDO_METADATA Sheet and Defining BI Publisher Functions.
Building a Simple Template
This section will demonstrate the concepts of Excel templates by walking through the steps to create a simple Excel template and testing it with the Excel Template Builder. This procedure will follow these steps:
Obtain sample XML data from your data model.
Open the BlankExcelTemplate.xls file and save as your template name.
Design the layout in Excel.
Assign the BI Publisher defined names.
Prepare the XDO_METADATA sheet.
Test the template using the desktop Excel Template Builder.
Step 1: Obtain sample XML data from your data model
You need sample data in order to know your field names and the hierarchical relationships to properly mark up the template. For information on saving sample data from your report data model, see the topic 'Testing Data Models and Generating Sample Data' in the Oracle Fusion Middleware Data Modeling Guide for Oracle Business Intelligence Publisher.
If you do not have access to the report data model, but you can access the report, you can alternatively save sample data from the report viewer. To save data from the report viewer:
In the BI Publisher catalog, navigate to the report.
Click Open to run the report in the report viewer.
Click the Actions menu, then click Export, then click Data. You will be prompted to save the XML file.
Save the file to a local directory.
The sample data for this example is a list of employees by department. Note that employees are grouped and listed under the department.
Step 2: Open the BlankExcelTemplate.xls file and save as your template name
Note: It is recommended that you install the Template Builder for Excel. For information on downloading the tool, see Desktop Tools.
The Template Builder installation includes a set of sample Excel templates, including a sample blank Excel template called BlankExcelTemplate.xls. This template file contains a blank Sheet1 and the XDO_METADATA sheet. It is recommended that you either start with this provided template or copy the XDO_METADATA sheet into your own Excel workbook.
Tip: If you are building a new template from an existing template, be sure to clear any existing defined names in the template sheet.
To open the BlankExcelTemplate.xls:
From a Windows desktop, click Start, then Programs, then Oracle BI Publisher Desktop, then Samples, then Excel.
In the Excel Templates sample folder, double-click BlankExcelTemplate.xls to open it.
Save the file as your selected name in the Microsoft Excel 97-2003 Workbook format (*.xls).
Step 3: Design the layout in Excel
An Excel template is a report layout that you design in Microsoft Excel for retrieving and formatting your enterprise reporting data in Excel. Excel templates provide a set of special features for mapping data to worksheets and for performing additional processing to control how your data is output to Excel workbooks.
Features of Excel Templates
With Excel templates you can:
Define the structure for your data in Excel output
Split hierarchical data across multiple sheets and dynamically name the sheets
Create sheets of data that have master-detail relationships
Use native XSL functions in your data to manipulate it prior to rendering
Use native Excel functionality
Limitations of Excel Templates
The following are limitations of Excel templates:
For reports that split the data into multiple sheets, images are not supported. If the template sheet includes images, when the data is split into multiple sheets, the images will show only on the first sheet.
There is no tool to facilitate the markup of the template with BI Publisher tags; all tags must be manually coded. Some features require the use of XSL and XSL Transformation (XSLT) specifications
Prerequisites
Following are prerequisites for designing Excel templates:
Microsoft Excel 2003 or later. The template file must be saved as Excel 97-2003 Workbook binary format (*.xls).
To use some of the advanced features, the report designer will need knowledge of XSL and XSLT.
The report data model has been created.
Supported Output
Excel templates generate Excel binary (.xls) output only.
Desktop Tools
BI Publisher provides a downloadable add-in to Excel that enables you to preview your template with sample data. This facilitates design by enabling you to test and edit your template without having to upload it to the BI Publisher catalog first.
The Template Builder for Excel is installed automatically when you install the Template Builder for Word. The tools can be downloaded from the Home page of Oracle Business Intelligence Publisher or Oracle Business Intelligence Enterprise Edition, as follows:
Under the Get Started region, click Download BI Publisher Tools.
Sample Excel Templates
The Template Builder includes sample Excel templates.
To access the samples from a Windows desktop:
Click Start, then Programs, then Oracle BI Publisher Desktop, then Samples, then Excel.
This will launch the folder that contains the Excel sample templates.
Concepts
Similar to RTF template design, Excel template design follows the paradigm of mapping fields from your XML data to positions in the Excel worksheet. Excel templates make use of features of Excel in conjunction with special BI Publisher syntax to achieve this mapping. In addition to direct mapping of data elements, Excel templates also utilize a special sheet (the XDO_METADATA sheet) to specify and map more complex formatting instructions.
Microsoft Excel Database Template
Identifying Data Field Placeholders and Groups
Excel templates use named cells and groups of cells to enable BI Publisher to insert data elements. Cells are named using BI Publisher syntax to establish the mapping back to the XML data. The cell names are also used to establish a mapping within the template between the named cell and calculations and formatting instructions that are defined on the XDO_METADATA sheet.
Your template content and layout must correspond to the content and hierarchy of the XML data file used as input to your report. Each group of repeating elements in your template must correspond to a parent-child relationship in the XML file. If your data is not structured to match the desired layout in Excel it is possible to regroup the data using XSLT preprocessing or the grouping functions. However, for the best performance and least complexity it is recommended that the data model be designed with the report layout in mind.
Note: See Preprocessing the Data Using an XSL Transformation (XSLT) File and Grouping Functions for more information about these options.
Use of Excel Defined Names
The Excel defined names feature is used to identify data fields and repeating elements. A defined name in Excel is a name that represents a cell, range of cells, formula, or constant value.
Tip: To learn more about defined names and their usage in Microsoft Excel 2007, see the Microsoft help topic: 'Define and use names in formulas.'
The defined names used in your Excel template must use the syntax described in this chapter, as well as follow the Microsoft guidelines described in the Microsoft Excel help document. Note that BI Publisher defined names are within the scope of the template sheet.
About the XDO_ Defined Names
The BI Publisher defined names are Excel defined names identified by the prefix 'XDO_'. Marking up the placeholders in the template files creates the connection between the position of the placeholders in the template and the XML data elements, and also maintains the ability to dynamically grow data ranges in the output reports, so that these data ranges can be referenced by other formula calculations, charts, and macros.
Using Native Excel Functions
You can use the XDO_ defined names in Excel native formulas as long as the defined names are used in a simple table. When a report is generated, BI Publisher will automatically adjust the region ranges for those named regions so that the formulas calculate correctly.
However, if you create nested groups in your template, the cells generated in the final report within the grouping can no longer be properly associated to the correct name. In this case, the use of XDO_ defined names with native Excel functions cannot be supported.
About the XDO_METADATA Sheet
Each Excel template requires a sheet within the template workbook called 'XDO_METADATA'. Use this sheet to identify your template to BI Publisher as an Excel template. This sheet is also used to specify calculations and processing instructions to perform on fields or groups in the template. BI Publisher provides a set of functions to provide specific report features. Other formatting and calculations can be expressed in XSLT.
It is recommended that you hide the XDO_METADATA sheet before you upload your completed template to the BI Publisher catalog. This will prevent report consumers from seeing it in the final report output.
Note: For more information see Format of the XDO_METADATA Sheet and Defining BI Publisher Functions.
Building a Simple Template
This section will demonstrate the concepts of Excel templates by walking through the steps to create a simple Excel template and testing it with the Excel Template Builder. This procedure will follow these steps:
Obtain sample XML data from your data model.
Open the BlankExcelTemplate.xls file and save as your template name.
Design the layout in Excel.
Assign the BI Publisher defined names.
Prepare the XDO_METADATA sheet.
Test the template using the desktop Excel Template Builder.
Step 1: Obtain sample XML data from your data model
You need sample data in order to know your field names and the hierarchical relationships to properly mark up the template. For information on saving sample data from your report data model, see the topic 'Testing Data Models and Generating Sample Data' in the Oracle Fusion Middleware Data Modeling Guide for Oracle Business Intelligence Publisher.
If you do not have access to the report data model, but you can access the report, you can alternatively save sample data from the report viewer. To save data from the report viewer:
In the BI Publisher catalog, navigate to the report.
Click Open to run the report in the report viewer.
Click the Actions menu, then click Export, then click Data. You will be prompted to save the XML file.
Save the file to a local directory.
The sample data for this example is a list of employees by department. Note that employees are grouped and listed under the department.
Step 2: Open the BlankExcelTemplate.xls file and save as your template name
Note: It is recommended that you install the Template Builder for Excel. For information on downloading the tool, see Desktop Tools.
The Template Builder installation includes a set of sample Excel templates, including a sample blank Excel template called BlankExcelTemplate.xls. This template file contains a blank Sheet1 and the XDO_METADATA sheet. It is recommended that you either start with this provided template or copy the XDO_METADATA sheet into your own Excel workbook.
Tip: If you are building a new template from an existing template, be sure to clear any existing defined names in the template sheet.
To open the BlankExcelTemplate.xls:
From a Windows desktop, click Start, then Programs, then Oracle BI Publisher Desktop, then Samples, then Excel.
In the Excel Templates sample folder, double-click BlankExcelTemplate.xls to open it.
Save the file as your selected name in the Microsoft Excel 97-2003 Workbook format (*.xls).
Step 3: Design the layout in Excel
In Excel, determine how you want to render the data and create a sample design, as shown in the following figure:
The design shows a department name and a row for each employee within the department. You can apply Excel formatting to the design, such as font style, shading, and alignment. Note that this layout includes a total field. The value for this field is not available in the data and will require a calculation.
Step 4: Assign the BI Publisher defined names
To code this design as a template, mark up the cells with the XDO_ defined names to map them to data elements. The cells must be named according to the following format:
Data elements: XDO_?element_name?
where
XDO_ is the required prefix and
?element_name? is either:
the XML tag name from your data delimited by '?'
a unique name that you will use to map a derived value to the cell
For example: XDO_?EMPLOYEE_ID?
Data groups: XDO_GROUP_?group_name?
where
XDO_GROUP_ is the required prefix and
?group_name? is the XML tag name for the parent element in your XML data delimited by '?'.
a unique name that you will use to define a derived grouping logic
For example: XDO_GROUP_?DEPT?
Note that the question mark delimiter, the group_name, and the element_name are case sensitive.
Applying a Defined Name to a Cell
Click the cell in the Excel worksheet.
Click the Name box at the left end of the formula bar. The default name will display in the Name box. By default, all cells are named according to position, for example: A8.
In the Name box, enter the name using the XDO_ prefix and the tag name from your data. For example: XDO_?EMP_NAME?
Press Enter.
The following figure shows the defined name for the Employee Name field entered in the Name box:
Repeat for each of the following data fields: DEPARTMENT_NAME, EMPLOYEE_ID, EMAIL, PHONE_NUMBER, and SALARY.
Tip: If you navigate out of the Name box without pressing Enter, the name you entered will not be maintained.
You cannot edit the Name box while you are editing the cell contents.
The name cannot be more than 255 characters in length.
For the total salary field, a calculation will be mapped to that cell. For now, name that cell XDO_?TOTAL_SALARY?. The calculation will be added later.
After you have entered all the fields, you can review the names and make any corrections or edits using the Name Manager feature of Excel. Access the Name Manager from the Formulas tab in Excel as shown:
After you have named all the cells for this example, the Name Manager dialog will appear as shown:
You can review all your entries and update any errors through this dialog.
Understanding Groups
A group is a set of data that repeats for each occurrence of a particular element. In the sample template design, there are two groups:
For each occurrence of the element, , the employee's data (name, e-mail, telephone, salary) will display in the worksheet.
For each occurrence of the element, the department name and the list of employees belonging to that department will display.
In other words, the employees are 'grouped' by department and each employee's data is 'grouped' by the employee element. To achieve this in the final report, add grouping tags around the cells that are to repeat for each grouping element.
Note that your data must be structured according to the groups you want to create in your template. The structure of the data for this example
establishes the grouping desired for the report.
Microsoft Excel App Download Pc
To Create Groups in the Template
Highlight the cells that make up the group. In this example the cells are A8 - E8.
Click the Name box at the left end of the formula bar and enter the name using the XDO_GROUP_ prefix and the tag name for the group from your data. For example: XDO_GROUP_?EMPS?
Press Enter.
The following figure shows the XDO_GROUP_ defined named entered for the Employees group. Note that just the row of employee data is highlighted. Do not highlight the headers. Note also that the total cell XDO_?TOTAL_SALARY? is not highlighted.
To define the department group, include the department name cell and all the employee fields beneath it (A5-E9) as shown in the following figure:
Enter the name for this group as: XDO_GROUP_?DEPT? to match the group in the data. Note that the XDO_?TOTAL_SALARY? cell is included in the department group to ensure it repeats at the department level.
Step 5: Prepare the XDO_METADATA Sheet
BI Publisher requires the presence of a sheet called 'XDO_METADATA' to process the template. This sheet must follow the specifications defined here.
Format of the XDO_METADATA Sheet
The XDO_METADATA sheet must have the format shown in the following figure:
The format consists of two sections: the header section and the data constraints section. Both sections are required. In the header section, all the entries in column A must be listed, but a value is required for only one: Template Type, as shown. The Data Constraints section does not require any content, but also must be present as shown.
This procedure describes how to set up the sheet for this sample Excel template to run. For the detailed description of the functionality provided by the XDO_METADATA sheet see Defining BI Publisher Functions.
Creating the XDO_METADATA Sheet
If you copied the XDO_METADATA sheet in Step 2, skip this section and proceed to Adding the Calculation for the XDO_?TOTAL_SALARY? Field; otherwise, set up the hidden sheet as follows:
Create a new sheet in your Excel Workbook and name it 'XDO_METADATA'.
Create the header section by entering the following variable names in column A, one per row, starting with row 1:
Version
ARU-dbdrv
Extractor Version
Template Code
Template Type
Preprocess XSLT File
Last Modified Date
Last Modified By
Skip a row and enter 'Data Constraints' in column A of row 10.
In the header region, for the variable 'Template Type' enter the value: TYPE_EXCEL_TEMPLATE
Adding the Calculation for the XDO_?TOTAL_SALARY? Field
Earlier in this procedure you assigned the defined named XDO_?TOTAL_SALARY? to the cell that is to display the total salaries listed in the SALARY column. In this step, you will add the calculation to the Data Constraints section of the XDO_METADATA sheet and map the calculation to the XDO_?TOTAL_SALARY? field.
In the Data Constraints section, in Column A, enter the defined name of the cell: XDO_?TOTAL_SALARY?
In Column B enter the calculation as an XPATH function. To calculate the sum of the SALARY element for all employees in the group, enter the following:
The completed XDO_METADATA sheet is shown in the following figure:
Step 6: Test the template
If you have installed the Template Builder for Excel, the BI Publisher tab will appear on the ribbon menu as shown in the following figure:
To preview your report using sample data:
Click Sample XML. You will be prompted to select the sample data file.
Click Preview.
The sample data will be applied to your template and the output document will be opened in a new workbook. The following figure shows the preview of the template with the sample data:
Formatting Dates
Excel cannot recognize canonical date format. If the date format in your XML data is in canonical format, that is, YYYY-MM-DDThh:mm:ss+HH:MM, you must apply a function to display it properly.
One option to display your date is to use the Excel REPLACE and SUBSTITUTE functions. This option will retain the full date and timestamp. If you only require the date portion in your data (YYY-MM-DD), another option is to use the DATEVALUE function. The following example shows how to use both options.
Example: Formatting a Canonical Date in Excel
Using the Employee by Department template and data from the first example, assume you want to add the HIRE_DATE element to the layout to and display the date as shown in Column E of the following figure:
To format the date as shown above, follow these steps:
Copy and paste a sample value for HIRE_DATE from the XML data into the cell that is to display the HIRE_DATE field. For example:
Copy and paste
1996-02-03T00:00:00.000-07:00
into the E8 cell.
Assign the cell the defined name XDO_?HIRE_DATE? to map it to the HIRE_DATE element in the data, as shown in the following figure:
If you do nothing else, the HIRE_DATE value will display as shown. To format the date as '3-Feb-96', you must apply a function to that field and display the results in a new field.
Insert a new Hire Date column. This will now be column F as shown in the following figure:
In the new Hire Date cell (F8), enter one of the following Excel functions:
To retain the full date and timestamp, enter:
To retain only the date portion (YYY-MM-DD), enter:
After you enter the function, it will populate the F8 cell as shown in the following figure:
Apply formatting to the cell.
Right-click the F8 cell. From the menu, select Format Cells. In the Format Cells dialog, select Date and the desired format, as shown in the following figure:
The sample data in the F8 cell now displays as 3-Feb-96.
Finally, hide the E column, so that report consumers will not see the canonical date that is converted.
Defining BI Publisher Functions
BI Publisher provides a set of functions to achieve additional reporting functionality. You define these functions in the Data Constraints region of the XDO_METADATA sheet.
The functions make use of Columns A, B, and C in the XDO_METADATA sheet as follows:
Use Column A to declare the function or to specify the defined name of the object to which to map the results of a calculation or XSL evaluation.
Use Column B to enter the special XDO-XSL syntax to describe how to control the data constraints for the XDO function, or the XSL syntax that describes the special constraint to apply to the XDO_ named elements.
Use Column C to specify additional instructions for a few functions.
The functions are described in the following three sections:
Reporting Functions
The following functions can be added to your template using the commands shown and a combination of BI Publisher syntax and XSL. A summary list of the commands is shown in the following table. See the corresponding section for details on usage.
Function | Commands |
---|---|
Split the report data into multiple sheets | XDO_SHEET_? with XDO_SHEET_NAME_? |
Define a parameter | XDO_PARAM_?n? |
Define a link | XDO_LINK_?link object name? |
Import a subtemplate | XDO_SUBTEMPLATE_?n? |
Reference Java extension libraries | XDO_EXT_?n? |
Splitting the Report into Multiple Sheets
Note: Images are not supported across multiple sheets. If the template sheet includes images, when the data is split into multiple sheets, the images will show only on the first sheet.
Use the this set of commands to define the logic to split the report data into multiple sheets:
Use XDO_SHEET_? to define the logic by which to split the data onto a new sheet.
Use XDO_SHEET_NAME_? to specify the naming convention for each sheet.
Column A Entry | Column B Entry | Column C Entry |
---|---|---|
XDO_SHEET_? | xsl_evaluation to split the data?> Example: | n/a |
XDO_SHEET_NAME_? | xsl_expression to name the sheet?> Example: | (Optional) original sheet name?> Example: |
XDO_SHEET_? must refer to an existing high-level node in your XML data. The example will create a new sheet for each occurrence of in the data.
If your data is flat you cannot use this command unless you first preprocess the data to create the desired hierarchy. 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. For more information, see Preprocessing the Data Using an XSL Transformation (XSLT) File.
Use XDO_SHEET_NAME_? to define the name to apply to the sheets. In Column B enter the XSL expression to derive the new sheet name. 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 your final sheet name. This example:
will name each sheet using the value of DEPARTMENT_NAME concatenated with '-' and the count of employees in the DEPT group.
The original sheet name entry in Column C tells BI Publisher on which sheet to begin the specified sheet naming. If this parameter is not entered, BI Publisher will apply the naming to the first sheet in the workbook that contains XDO_ names. You would need to enter this parameter if, for example, you have a report that contains summary data in the first two worksheets and the burst data should begin on Sheet3. In this case, you would enter in Column C.
Example: Splitting the data into multiple sheets
Using the employee data shown in the previous example. This example will:
Create a new worksheet for each department
Name each worksheet the name of the department with the number of employees in the department, for example: Sales-21.
Enter the defined names for each cell of employee data and create the group for the repeating employee data:
Note: Do not create the grouping around the department because the data will be split by department.
Enter the following in the Data Constraints section of the XDO_METADATA sheet:
Column A Entry Column B Entry XDO_SHEET_? XDO_SHEET_NAME_?
The entries are shown in the following figure:
The following figure shows the generated report. Each department data now displays on its own sheet, which shows the naming convention specified:
Declaring and Passing Parameters
To define a parameter, use the XDO_PARAM_?n? function to declare the parameter, then use the $parameter_name syntax to pass a value to the parameter. A parameter must be defined in your data model.
To declare the parameter, use the following command:
Column A Entry | Column B Entry |
---|---|
XDO_PARAM_?n? where n is unique identifier for the parameter | parameter_name;parameter_value?> where parameter_name is the name of the parameter from the data model and parameter_value is the optional default value. For example: |
To use the value of the parameter directly in a cell, refer to the parameter as $parameter_name in the definition for the XDO_ defined name, as follows:
Column A Entry | Column B Entry |
---|---|
XDO_PARAM_?parameter_name? for example: XDO_PARAM_?Country? | parameter_name?>. For example: |
You can also refer to the parameter in other logic or calculations in the XDO_METADATA sheet using $parameter_name.
Example: Defining and passing a parameter
In this example, declare and reference a parameter named Country.
In the template sheet, mark the cell with a defined name. In the figure below, the cell has been marked with the defined name XDO_?Country?
In the hidden sheet assign that cell the parameter value as follows:
Defining a Link
Use the XDO_LINK_? command to define a hyperlink for any data cell.
Column A Entry | Column B Entry |
---|---|
XDO_LINK_?cell object name? For example: XDO_LINK_?INVOICE_NO? | <xsl statement to build the dynamic URL> For example: |
Example: Defining a Link
Assume your company generates customer invoices. The invoices are stored in a central location accessible by a Web server and can be identified by the invoice number (INVOICE_NO). You can generate a report that creates a dynamic link to each invoice as follows:
In your template sheet, assign the cell that is to display the INVOICE_NO the XDO defined name: XDO_?INVOICE_NO?.
In the XDO_METADATA sheet, enter the following:
Column A Entry Column B Entry XDO_LINK_?INVOICE_NO? The entries in Excel are shown in the following figure:
The report output will display as shown in the following figure. The logic defined in the XDO_METADATA sheet will be applied to create a hyperlink for each INVOICE_NO entry:
Importing and Calling a Subtemplate
Use these commands to declare XSL subtemplates that you can then call and reference in any of the XDO_ commands.
Note: The Template Builder for Excel does not support preview for templates that import subtemplates.
To import the subtemplate, enter the following command:
Column A Entry | Column B Entry |
---|---|
XDO_SUBTEMPLATE_?n? where n is a unique identifier. For example: XDO_SUBTEMPLATE_?1? . | For example: |
To call the subtemplate, declare the cell name for which the results should be returned in Column A, then enter the call-template syntax with any other XSL processing to be performed:
Column A Entry | Column B Entry |
---|---|
XDO_?cell object name? |
For more information on XSL subtemplates and creating the subtemplate object in the catalog, see Designing XSL Subtemplates.
Example: Importing and Calling a Subtemplate
Assume you have the following subtemplate uploaded to the BI Publisher catalog as PaymentsSummary-SubTemplate.xsb. This subtemplate will evaluate the value of a parameter named pPayType and based on the value, return a string that indicates the payment type:
In your Excel template, you have defined a field with the XDO Defined Name XDO_?TYPE?, which will be populated based on the string returned from code performed in the subtemplate, as shown in the following figure:
Enter the following in the Data Constraints region:
Column A Entry | Column B Entry |
---|---|
XDO_SUBTEMPLATE_?1? | |
XDO_?TYPE? |
The XDO_SUBTEMPLATE_?1? function imports the subtemplate from the BI Publisher catalog.
The XDO_?TYPE? cell entry maps the results of the subtemplate processing entered in Column B.
Referencing Java Extension Libraries
You can include the reference to a Java extension library in your template and then call methods from this library to perform processing in your template. Use this command to reference the Java extension libraries:
Column A Entry | Column B Entry |
---|---|
XDO_EXT_?n? where n is a unique identifier. Example: XDO_EXT?1? | exension library'?> Example: |
You can have multiple extension libraries defined in a single template file.
Example: Calling a Java Extension Library
Assume the extension library includes the following two methods that you want to call in your template:
bipext:infTimeToStr()
bipext:infStrToTimet()
After you have declared the library as shown above, specify the cell to which you want to apply the method by entering the XDO defined name in Column A and calling the function in Column B. For example:
Column A Entry | Column B Entry |
---|---|
XDO_?PARAM_START_DATE? |
The entries in the XDO_METADATA sheet to declare and call the Java extension libraries are shown in the following figure:
Formatting Functions That Rely on Specific Data Attribute Values
The following commands require that specific formatting attributes be present in the XML data file. A summary list of the commands is shown in the following table. See the corresponding section for details on usage.
Function | Command |
---|---|
Define border and underline styles | XDO_STYLE_n_?cell object name? |
Skip a row | XDO_SKIPROW_?cell object name? |
Defining Border and Underline Styles
While you can define a consistent style in the template using Excel formatting, the XDO_STYLE command enables you to define a different style for any data cell dynamically based on the XML data.
With the XDO_STYLE command you specify the cell to which to apply the style, the logic to determine when to apply the style, and the style type to apply. The style value must be present in the XML data.
Column A Entry | Column B Entry | Column C Entry |
---|---|---|
XDO_STYLE_n_?cell_object_name? For example: XDO_STYLE_1_?TOTAL_SALARY? | <xsl evaluation that returns a supported value> For example: | Style type For example: BottomBorderStyle |
BI Publisher supports the following normal Excel style types and values:
Style Type | Supported Values (Must be in returned by evaluation in Column B) | Supported Types (Enter in Column C) |
---|---|---|
Normal | BORDER_NONE BORDER_THIN BORDER_MEDIUM BORDER_DASHED BORDER_DOTTED BORDER_THICK BORDER_DOUBLE BORDER_HAIR BORDER_MEDIUM_DASHED BORDER_DASH_DOT BORDER_MEDIUM_DASH_DOT BORDER_DASH_DOT_DOT BORDER_MEDIUM_DASH_DOT_DOT BORDER_SLANTED_DASH_DOT | BottomBorderStyle TopBorderStyle LeftBorderStyle RightBorderStyle DiagonalLineStyle |
You can also set a color using one of the following types:
Style Type | Supported Value (Must be in returned by evaluation in Column B) | Supported Types (Enter in Column C) |
---|---|---|
Normal | When you set Color Style, give the value in RRBBGG hex format, for example: borderColor='0000FF' | BottomBorderColor TopBorderColor LeftBorderColor RightBorderColor DiagonalLineColor |
BI Publisher also supports the underline type with the following values:
Style Type | Supported Values (Must be in returned by evaluation in Column B) | Supported Type (Enter in Column C) |
---|---|---|
Underline | UNDERLINE_NONE UNDERLINE_SINGLE UNDERLINE_DOUBLE UNDERLINE_SINGLE_ACCOUNTING UNDERLINE_DOUBLE_ACCOUNTING | UnderlineStyle |
You can have multiple underline styles defined for a single cell.
Example: Defining Styles
To apply a style in a template, the style value must be present in the data. In this example, a border style and an underline style will be applied to the DEPT_TOTAL_SALARY field shown in the Excel template.
For this example, the following data is used. Note that the DEPT_TOTAL_SALARY element in the data has these attributes defined:
borderStyle
underLineStyle
borderColor
The value of each of these attributes will be used to apply the defined style based on logic defined in the template.
In the Excel template assign the defined named XDO_?DEPT_TOTAL_SALARY? to the field that is to display the DEPT_TOTAL_SALARY from the data.
In the XDO_METADATA sheet, enter the following:
To define the top border style, enter:
Column A Entry Column B Entry Column C Entry XDO_STYLE_1_?DEPT_TOTAL_SALARY? TopBorderStyle The entry in Column A maps this style command to the cell assigned the name XDO_?DEPT_TOTAL_SALARY?
The entry in Column B retrieves the style value from the attribute borderStyle of the DEPT_TOTAL_SALARY element. Note from the sample data that the value for borderStyle is 'BORDER_DOUBLE'.
The entry in Column C tells BI Publisher to apply a TopBorderStyle to the cell.
To define the top border color, enter:
Column A Entry Column B Entry Column C Entry XDO_STYLE_2_?DEPT_TOTAL_SALARY? TopBorderColor The entry in Column A maps this style command to the cell assigned the name XDO_?DEPT_TOTAL_SALARY?
The entry in Column B retrieves the style value from the attribute borderColor of the DEPT_TOTAL_SALARY element. Note from the sample data that the value for borderColor is '0000FF' (blue).
The entry in Column C tells BI Publisher to apply a TopBorderColor to the cell.
To define the underline style, enter:
Column A Entry Column B Entry Column C Entry XDO_STYLE_3_?DEPT_TOTAL_SALARY? UnderlineStyle The entry in Column A maps this style command to the cell assigned the name XDO_?DEPT_TOTAL_SALARY?
The entry in Column B retrieves the style value from the attribute underLineStyle of the DEPT_TOTAL_SALARY element. Note from the sample data that the value for underLineStyle is 'UNDERLINE_DOUBLE_ACCOUNTING'.
The entry in Column C tells BI Publisher to apply the UnderLineStyle to the cell.
The following figure shows the three entries in the Data Constraints region:
When you run the report, the style commands will be applied to the XDO_?DEPT_TOTAL_SALARY? cell, as shown in the following figure:
Skipping a Row
Use the XDO_SKIPROW command to suppress the display of a row of data in a table when the results of an evaluation defined in Column B return the case insensitive string 'True'.
Column A Entry | Column B Entry |
---|---|
XDO_SKIPROW_?cell_object_name? For example: XDO_SKIPROW_?EMPLOYEE_ID? | <xsl evaluation that returns the string 'True'/> For example: |
Example: Skipping a Row Based on Data Element Attribute
In this example, the Excel template will suppress the display of the row of employee data when the EMPLOYEE_ID element includes a 'MANAGER' attribute with the value 'True'.
Assume data as shown below. Note that the EMPLOYEE_ID element for employee Michael Hartstein has the MANAGER attribute with the value 'True'. The other EMPLOYEE_ID elements in this set do not have the attribute.
To suppress the display of the row of the employee data when the MANAGER attribute is set to 'True', enter the following in the Data Constraints section:
Column A Entry | Column B Entry |
---|---|
XDO_SKIPROW_?EMPLOYEE_ID? | |
The output from this template is shown in the following figure. Note that the employee Michael Hartstein is not included in the report:
Grouping Functions
Use these functions to create groupings of data in the template.
Function | Command |
---|---|
Group data | XDO_GROUP_?group element? |
Regroup data | XDO_REGROUP_? |
Grouping the data
Use the XDO_GROUP command to group flat data when your layout requires a specific data grouping, for example, to split the data across multiple sheets.
Column A Entry | Column B Entry | Column C Entry |
---|---|---|
XDO_GROUP_?group element? For example: XDO_GROUP_?STATE_GROUP? | <xsl beginning groupng logic/> For example: | <xsl ending groupng tags/> For example: |
Define the XSL statements to be placed at the beginning and ending of the section of the group definition marked up by XDO_?cell object name?. You can mark multiple groups nested in the template, giving each the definition appropriate to the corresponding group.
Regrouping the Data
The XDO_REGROUP regroups the data by declaring the structure using the defined names. It does not require the XSLT logic.
Column A Entry | Column B Entry |
---|---|
XDO_REGROUP_? | XDO_REGROUP_?UniqueGroupID?levelName?groupByName?sortByName?sortByName?sortByName? where
|
The following shows an example of how to create three nested groupings:
Column A Entry | Column B Entry |
---|---|
XDO_REGROUP_? | XDO_REGROUP_?PAYMENTSUMMARY_Q1?PAYMENTSUMMARY_Q1?PAY_TYPE_NAME? |
In the above definition, the most outer group is defined as PAYMENTSUMMARY_Q1, and it is grouped by PAY_TYPE_NAME
Column A Entry | Column B Entry |
---|---|
XDO_REGROUP_? | XDO_REGROUP_?COUNTRYGRP?XDO_CURRGRP_?COUNTRY? |
The above definition creates a second outer group. The group is assigned the name COUNTRY_GRP and it is grouped by the element COUNTRY.
Column A Entry | Column B Entry |
---|---|
XDO_REGROUP_? | XDO_REGROUP_?STATEGRP?XDO_CURRGRP_?STATE? |
This definition creates the inner group STATEGRP and it includes a sortByName parameter: STATE.
Preprocessing the Data Using an XSL Transformation (XSLT) File
For the best performance, you should design your data model to perform as much of the data processing as possible. When it is not possible to get the required output from data engine, you can preprocess the data using an XSLT file that contains the instructions to transform the data. Some sample use cases may be:
To create groups to establish the necessary hierarchy to support the desired layout
To add style attributes to data elements
To perform complex data processing logic that may be impossible in the Excel Template or undesirable for performance reasons
Note: The Template Builder for Excel does not support preview for templates that require XSLT preprocessing.
To use an XSLT preprocess file:
Create the file and save as .xsl.
Upload the file to the report definition in the BI Publisher catalog, as you would a template:
Navigate to the report in the catalog.
Click Edit.
Click Add New Layout.
Click Upload.
Complete the fields in the Upload dialog and select 'XSL Stylesheet (HTML/XML/Text)' as the template Type.
After upload, click View a List. Deselect Active, so that users will not see this template as an option when they view the report.
Note: For testing purposes, you may want to maintain the XSL template as active to enable you to view the intermediate data when the template is applied to the data. After testing is complete, set the template to inactive.
Save the report definition.
In your Excel template, on the XDO_METADATA sheet, in the Header section, enter the file name for the Preprocess XSLT File parameter. For example: SplitByBrand.xsl
Using the Template Viewer to Debug a Template
If your template preview is not generating the results expected, you can use the Template Viewer to enable trace settings to view debug messages. The Template Viewer also enables you to save and view the intermediate XSL file that is generated after the sample data and template are merged in the XSL-FO processor. If you are familiar with XSL this can be a very useful debugging tool.
The Template Viewer is installed when you install the Template Builder for Word; see Desktop Tools for more information.
To preview with the Template Viewer and view log messages:
Open the Template Viewer:
From your Windows desktop, click Start, then Programs, then Oracle BI Publisher Desktop, then Template Viewer.
Click Browse to locate the folder that contains your sample data file and template file. The data file and template file must reside in the same folder.
Select Excel Templates. The Data and Template regions will display all .xml files and all .xls files present in the directory.
Click the appropriate data and template files to select them.
Select the log level.
From the Output Format list, select Excel.
Click Start Processing.
The Template Viewer will merge the selected data with the selected template and spawn the appropriate viewer. View any log messages in the message box as shown in the following figure:
To view the generated XSL:
In the Template Viewer, select the data and template files and choose Excel output.
On the Tools menu, select Generate XSL file from and then choose Excel Template.
At the prompt, save the generated XSL file.
Navigate to the saved location and open the XSL file in an appropriate viewer.
Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved.
Multipart article
In this article, you'll find the most useful free, downloadable test case templates in Microsoft Excel and PDF formats. Learn how to use these templates to review and verify certain features and functions of an application, software, a trial, or a test and update those features and functions based on test results.
Test Case Planning and Execution Template
With this complete test case planning and execution template, you can map out test plans for individual components of a project or trial, seamlessly execute tests, and analyze the data that comes from a test. You can also track tests by test ID and name, identify each step of a test, add priority levels and notes, and compare actual versus expected results. This complete testing template is compatible for all tests, from clinical trials to software updates.
Download Test Case Planning and Execution Template
Excel | Word | PDF | Smartsheet
Test Case Point Estimate Template
Assess the approach needed to test software, determine testing checkpoints and preconditions, and analyze all test results with this comprehensive test case point estimate template. Use this template to rate priorities and complexities based on a high-to-low measure, allocate testing time for each specific step, and determine the amount of work associated with each test.
Download Test Case Point Estimate Template
Excel | Smartsheet
Manual Testing Test Case Template
With this manual testing test case template, you can record testing steps and data, analyze expected results versus actual results, and determine whether or not you can consider a test to be a success. With space to record each individual step of the testing process, the test ID and name, and additional notes to consider during analysis, this template allows you to run through every possible result in a trial and determine if it passed or failed inspection.
Download Manual Testing Test Case Template
Excel | Word | PDF
Automation Testing Test Case Template
Use this automation testing test case template to review the success or failure of an automated software, application, or feature. Document the test name and ID, the test duration, each separate step and component, and any notes about the test, including the parts of the test that are automated. Simply download and fill out this form to fit the needs of whatever automated application you are testing.
Download Automation Testing Test Case Template
Excel | PDF
User Acceptance Testing Test Case Template
With this user acceptance testing (UAT) test case template, test newly designed software to ensure that it matches the designated specifications and meets all user-provided requirements. Track individual applications, the steps to execute them, and both the expected and actual results with this comprehensive testing template.
Download User Acceptance Testing Test Case Template
Excel | PDF
SQL Server Integration Services Testing Test Case Template
Manage, test, and track all SQL server integration services with this detailed test case template. You can use this SQL test case template to ensure that all programming and data management systems are working correctly and test any updates or quick fixes.
Download SQL Server Integration Services Testing Test Case Template
Excel | PDF
What Is a Test Case Document?
A test case document is a set of steps that a team can execute to test certain scenarios based on the needs of the function, from clinical trials to software updates and even project management changes. Each test case includes a set of preconditions as well as test data, expected results, actual results, and post-conditions that help determine the success or failure of a test.
All steps of a test case are meant to check the functionality and applicability of each test, based on the preconditions and expected results. A test case is considered the smallest unit of a testing plan and contributes to the overall test script or user story.
To begin a test case, one must first describe the actions and parameters they mean to achieve, verify, or challenge regarding any expected behavior of a test. There are sets of conditions and variables that the tester uses to determine the quality and success of a system, trial, feature, or software, and the end results can confirm these facts.
What Is the Purpose of a Test Case?
A test case can help you easily identify any problems, unplanned issues, or missed details in a project, update, or trial. Additionally, test cases provide the following benefits for the individuals or teams who carry them out:
- Minimize ad-hoc testing
- Make manual test case management easier and more streamlined
- Save valuable time when testing and analyzing results
- Enable testers to develop individual test cases for specific scenarios
- Verify the success of updates or changes
- Make it easier to share results with stakeholders and gain buy-in from all involved parties
- Lessen the effort and error rate involved in testing
- Define and flesh out all positive and negative test results or behavior
- Divide tests into positive and negative segments
- Eliminate the number of bugs or errors in an end product
- Communicate all specific conditions from the start in order to eliminate confusion
- Keep management updated on the quality status of a test
- Help testers generate detailed summaries and reports on test status, defects, bugs, etc.
- Track productivity and trace all problems back to the source
- Help testers write and report on more comprehensive test case results
What Are the Components of a Test Case?
A test case is comprised of many different components: It assesses what is being tested, the expected results of a test, and the process involved in testing each specified element of a case.
In general, test cases should include the following:
- Test Process: This includes the test review and approval, the test execution plan, the test report process, use cases (if applicable), and performance risks.
- Positive and Negative Tests: Positive tests should help check whether the functionality is performing correctly, while negative tests should check every reverse situation where an error or issue could occur.
- Test Case ID: This helps you correctly and uniformly document each test case and its corresponding results; it also helps you avoid retesting the same things.
- Test Scenario: This includes all the information about a test in the form of specific, detailed objectives that will help a tester perform a test accurately. It will not, however, include specific steps or sequences.
- Test Steps: The steps should tell a tester, in detail, exactly what they should do during each step, including specific objectives.
- Test Data: This section includes all the information and data that a test collects throughout the duration of the process.
- Expected Results: This includes any detailed and precise information or data that a tester should expect to see and gather from a test.
- Actual Results: This includes all positive and negative results that you receive from a test and that help you confirm or reject the expected results and detect any issues or bugs.
- Confirmation: This is the part of the process during which testers discuss and review whether or not a test was a success or a failure, based on the results.
What Is the Difference between a Test Case and a Test Scenario?
Although they may seem quite similar, test cases and test scenarios are two very different aspects involved in testing the functionality of a new software, update, or process. Test cases are specific conditions under which a new functionality is tested, whereas a test scenario is the overall end-to-end functionality of an application when it is working correctly.
Test cases are usually lower-level actions that can be created or derived from test scenarios. They give information about preconditions, what is being tested, how the test will be carried out, and the expected results.
Test cases require detailed documentation in order to assess how a test is proceeding, and a test case verifies the output of a function.
On the other hand, test scenarios are made up of test procedures, which encompass many test cases. Test scenarios are generally considered to be higher level and include groups of test cases, depending on the following factors: the functionality being tested, the type of test being performed, and the duration of the test.
Overall, test scenarios help reduce the complexity and confusion involved in creating a new product or updating a new function.
Tips to Write, Implement, and Track Test Cases
In order to gain the most from the tests you are running, you must create comprehensive, detailed, and test-specific test cases that describe exactly what is being tested, why it is being tested, and what the expected results should be.
To run the most effective test cases and gain powerful, actionable insights, follow these simple tips:
- Make the test steps as clear as possible, avoiding vague objectives and directions.
- Ensure that the test has no more than 15 steps to avoid confusion. If there are more than 15 steps, break the test into separate tests.
- In the test directions, include any additional documents or references that might be relevant to the test itself.
- Include a detailed description of the requirement being tested, and explain in detail how the test should be carried out for each requirement.
- Provide details on all the expected results, so the tester can compare the actual results against them. Of course, this step is unnecessary if the expected results are obvious.
- Use active case language when writing the steps, and make sure they are as simple and clear as possible.
- Avoid repeating any of the same steps, as this could add confusion to an already complicated process.
- Include the test name and ID in the testing instructions.
- Keep the end user in mind as you develop the test and its variables.
- Reread and peer review the test case instructions before finalizing them.
- Remember that the test case should be repeatable, traceable, and accurate.
Test Case Use Cases
You can leverage test cases for a variety of purposes: to gain insight into how processes are performing; to determine how software updates are being used; and to figure out how business trials or tests are progressing.
Some of the most common use cases for test cases include the following:
- Confirming login functionality on a username and password combination
- Checking to see how the login function reacts to a valid or invalid username or password
- Seeing what happens when someone inputs an empty response for either the username or password component
Numerous companies, such as HP Quality Center and Jira, use test cases to track and update their processes.
Improve Your Test Cases with Free Test Case Templates in Smartsheet
Empower your people to go above and beyond with a flexible platform designed to match the needs of your team — and adapt as those needs change.
Microsoft Excel Test Script Template Download Free Apps Downloads
The Smartsheet platform makes it easy to plan, capture, manage, and report on work from anywhere, helping your team be more effective and get more done. Report on key metrics and get real-time visibility into work as it happens with roll-up reports, dashboards, and automated workflows built to keep your team connected and informed.
When teams have clarity into the work getting done, there's no telling how much more they can accomplish in the same amount of time. Try Smartsheet for free, today.