To create a template for an OpenDocument spreadsheet or Microsoft Excel spreadsheet
- Open OpenOffice.org Calc or Microsoft Excel.
- Add the code to the template file.
- Save the template file.
- Add the template to Report Wizard.
All multiline directives such as #if, #else, #elseif, #foreach, and #macro must be used under the following conditions:
- The beginning and end of a statement must be declared within a single cell. A #macro statement must be declared in a single cell.

- You can use #foreach in a single cell record only. To create data for multiple rows, use the #forrow directive instead, see figure below.

- You can use #forcol to create data for multiple columns, see figure below. You can use the statement in conjunction with #forrow.
