For the complete documentation index, see llms.txt. This page is also available as Markdown.

Build and Upload an XLSX Template

Design the workbook in Microsoft Excel, add bracketed S-Docs syntax, upload the .xlsx file, and generate dynamic spreadsheet output from Salesforce data.

Use this page when you want workbook-native design in Microsoft Excel and a generated .xlsx output from Salesforce data.

An XLSX template is built in Excel, then uploaded to S-Docs for generation.

Use XLSX when spreadsheet structure matters more than HTML layout, Word editing, or slide design.

Pick XLSX when you need spreadsheet-first output, Excel design tools, and bracket-based S-Docs syntax.

Pick Microsoft Word (DOCX) when users need document-style output in Word.

Before you start

Make sure you have:

  • a new S-Docs template with format set to XLSX

  • the correct Related To Type for your base record

  • an .xlsx file you can edit in Microsoft Excel

  • the right upload path for your S-Docs version

XLSX templates do not support related lists.

If you need repeating row output, use a format that supports related lists instead.

XLSX upload behavior depends on whether Enable New Microsoft Template Upload is checked.

  • Checked — use the newer Microsoft template upload flow. This applies to Summer 2025 (v10.0) and later. These templates generate through S-Docs LWCs or the SDK.

  • Not checked — use the legacy upload flow in Template Editor. These templates generate through the legacy custom S-Docs button.

Build and upload an XLSX template

1

Create the template record

Create a new S-Docs template.

Set Template Format to XLSX.

2

Build the workbook in Microsoft Excel

Create the workbook layout in Excel exactly as you want it to appear.

Use normal Excel tools for worksheets, tables, formulas, number formats, and cell styling.

3

Add S-Docs merge syntax

Insert merge fields, render blocks, and query output using bracketed Microsoft template syntax.

4

Add merge fields, logic, and formulas

Place merge fields where single values should appear.

Add conditional logic where worksheet content should show only for certain records.

Keep workbook formulas and formatting in Excel.

5

Upload the .xlsx file

If Enable New Microsoft Template Upload is checked, upload the file through the newer Microsoft template upload flow.

If it is not checked, upload the file in Template Editor.

6

Generate and test with real data

Test the template with real Salesforce records.

Verify merge fields, formulas, row growth, number formatting, and conditional sections before rollout.

Core XLSX syntax patterns

Merge fields

Wrap merge fields in square brackets.

Use this same pattern for standard field paths too.

Conditional logic

Wrap both RENDER tags in square brackets.

Keep merge fields inside rendered content in square brackets too.

Use the same operators you use in standard conditional logic.

Nested render blocks work too.

Named queries

Wrap both the query block and output fields in square brackets.

If you need a filtered or offset result, keep the same square-bracket wrapping.

For XLSX syntax, three rules matter most:

  • merge fields use square brackets

  • named query output fields use square brackets

  • RENDER blocks use square brackets

Common syntax mistakes

  • Field prints as text: add square brackets around the merge field

  • Conditional block does not run: wrap both opening and closing RENDER tags in square brackets

  • Named query returns nothing: confirm the output field is wrapped in square brackets and included in SELECT

  • Related list output is expected: XLSX does not support related lists

  • Formatting shifts after edits: re-upload the workbook and retest with real data

What XLSX supports

XLSX templates support these common S-Docs capabilities:

  • merge fields

  • conditional logic

  • named queries

  • Excel-native formatting and formulas

  • generation through S-Docs LWCs and the SDK when uploaded through the newer Microsoft template upload flow

Important XLSX limitations

Keep these XLSX-specific rules in mind:

  • Live Edit is not supported.

  • Template headers and footers are not supported.

  • Component templates are not supported.

  • S-Sign is not supported.

  • Related lists are not supported.

  • Leading zeros and strict number formats may need explicit Excel formatting.

Next reads by goal

Last updated

Was this helpful?