# Insert Table

Learn how to insert a table into a Microsoft Excel template using data from a Salesforce Record Collection Variable Resource.

> Kind: Guide · Updated: Jul 4, 2026

You can insert a table into a Microsoft Excel template using data from Salesforce records. These records are stored as a Collection Variable Resource, which allows you to retrieve and display structured data within the document.

- Select the Action:
- In the "Select Action" dropdown, choose "Insert Table."

- Choose a Record Collection Variable:
- In the "Resource Type" field, select a Record Collection Variable Resource.
- Ensure that a resource is created before inserting the table.

- Define Table Structure:
- Set the resource type as a collection.
- Select the desired number of columns in the Excel sheet, click "Insert" ,and a table will be created automatically without specifying the number of rows.

- Insert Fields :
- Rename the columns as needed and insert relevant fields into the table.

- Sort Records :
- You can control the order of records displayed in the table.
- For example, to display orders in ascending order of amount, select the "Amount" field and set the order to Ascending.

- Apply Filters and Limits:
- Set filters to refine the records inserted into the table.
- Limit the number of records displayed.
- Define the order in which records appear.

By following these steps, you can dynamically insert and manage tables in Salesforce based on record collections.

> You can customize and format the table using standard Word formatting options, including font styles, alignment, borders, and shading.

![](https://media.help.cloudfiles.io/dg-insert-table-2-sf/01.png)

Go to 0:50 to see the Insert Table action being used to create a sample file in Microsoft Excel.

[Watch video](https://youtu.be/U-KHEykEyY8)
