Using Microsoft Excel Template

You can create a Microsoft Excel .xlsx email attachment using a Microsoft Excel template. 

The resulting Microsoft Excel document can include column headers and data cells containing:

Creating the Template

You can create a Microsoft Excel template file as described here.

Template Start Expression

Typically the first row in the Excel template contains column header values. 

The second row in the Excel template contains a Start expression, one or more cell data values, and an End expression. 

  1. The leftmost cell contains a Start expression immediately followed by a data value or Microsoft Excel worksheet formula.
  2. Intermediate cells contain data value or Microsoft Excel worksheet formulas.
  3. The rightmost cell contains a data value or Microsoft Excel worksheet formula immediately followed by an End expression.

The Start expression retrieves a set of rows from a table you specify. Each retrieved table row populates a row in the resulting Excel file. 

In the following example, the Start expression retrieves rows from the Customer table. The resulting Excel file contains one row for each customer who is 21 years of age or older.

Worksheet Formulas

Your template can include Excel worksheet formulas. In the following template, the Total column contains a worksheet formula which multiplies Price and Qty.

=B2*C2

Cell Formatting

You can apply Excel formatting to the cells of the template. For example, the Price cell could be formatted as a Currency value.

Multi-Worksheet Workbooks

Your Excel workbook template can contain one or more worksheets each of which is a template. The resulting ,xlsx file will contain each of these worksheets.

Viewing or Editing the Template

Once the template is created, click the View button to view the template.

The View button does not work well for editing Microsoft Excel templates because of built-in limitations in the way Microsoft Excel files can be opened and edited from the web. Instead, login to your data source and edit the Microsoft Excel template file there.

Limitations

  1. Excel tables are not supported. Templates must be simple worksheets.
  2. Excel pivot tables are not supported.

Did this answer your question?