Excel

Create a Excel(.xlsx, .xlsm) template file when outputting Excel files.

*Please check the Template Common Settings before referring to this page.

 

Formatting of Merge fields

 

Data type/Value Description
Date Serial values are output. Set the format from "Format Cells" in Excel.
Currency Symbol The currency symbol is not output. Set the format from "Format Cells" in Excel.
Commas in numbers/currency Three-digit commas are not output. Set the format from "Format Cells" in Excel.
Decimal Point Set the decimal point from "Format Cells" in Excel.
Long Text Area Set the Alignment to "Wrap text" from "Format Cells" in Excel.

 

Memo

When creating the Excel template, enter the sample values, adjust the cell formatting, and then set the merge field.

 

 

Multiple Sheet Output

Merge fields can be set on multiple sheets. There is no limit to the number of sheets, but if there are many output contents, the governor's limit may cause an output error.

 

 

Excel Formulas

Excel formulas can be used in the template.

  • Formulas that specify a range, such as the total value of child records, should be specified as "child record first row cell:child record first row cell" (e.g., A1:A1). When outputting, the range is changed to "A1:A3" according to the number of records in the child records.
  • If the formula refers to a cell in the child record row and there are no records in the child record, the formula is output as "=0".
  • After entering the formula, please set the formatting again. After entering a formula in a cell, the formatting may automatically change to general.
  • Merged fields cannot be set within a formula. NG e.g. ="{!Opportunity.Amount}"+"{!Opportunity.Tax__c}"
  • Complex layouts are not supported. If the output is not correct, such as a misalignment of formulas, create formula fields in Salesforce and set the formula field as merge fields.

 

 

Office Features

Available Office Features

Excel Formulas, Data Validation, Conditional Formatting, Table, and Shapes are available.

*Tables are for layout only, excluding aggregate functions.

 

Notes on available Office features

  • Not all templates are supported. Complex patterns are not supported.
  • When opening the file, if the message "We found a problem with some content in 'XXX.xlsx'. Do you want us to try to recover as much as we can?" or other error messages, remove the Office features in the template.
  • Office features are outside the scope of support. Check with your templates and output contents in the Sandbox.

 

 

Template Sample

 

 

Download Sample Template Files

 

 

Reference

Template Common Settings

Generate an Excel file in Salesforce using Office File Creator – (1) Create a template file

Setting Formulas in Excel Template Files with Office File Creator

 

 

Troubleshooting