Skip to main content

Comp Duplicates from Spreadsheet


Need to create 100 duplicates of a composition in After Effects and customize the texts, videos, images, colors, etc in each of them?

Automation Blocks includes a very efficient workflow for creating custom comp duplicates based on a spreadsheet in three steps:

  1. annotate everything that you want to customize in your composition (and precomps)
  2. run the script export spreadsheet from template comp to generate a spreadsheet based on your annotations
  3. after you've filled the spreadsheet with data, run the script create comp duplicates from spreadsheet, which creates one copy of the comp for each row of the spreadsheet.

Detailed Tutorial


Step 1: Annotate Comp

First, in the composition that you want to duplicate (and any precomps) anotate everything that you want to customize with the spreadsheet. In a nutshell, you just put a $ followed by the name or number of a spreadsheet column at the beginning of the name of anything you want to show up in the spreadsheet:

Annotate Ae Comp for Spreadsheet Export
space behind $ annotation

Make sure to leave a space (or another non-letter symbol) after the $ annotation. Names $A My Text and $A-My Text are ok, but a name $AMy Text is interpreted as a spreadsheet column AMY and not as spreadsheet column A.

Instead of letters $A, $B,... you can also use numbers $1, $2,...

Here is an overview of everything that can be annotated.


To add the text of a text layer to the spreadsheet, just put $A at the beginning of the name of the text layer.

footage files

To add the source file of an image/video/audio layer to the spreadsheet, just put $A at the beginning of the name of the layer. The spreadsheet will contain only the file name, without the path. The other files that this file should be replaced by must be located in the same folder of your hard-drive. The create comp duplicates from spreadsheet will import these files into your project when needed, but will also detect if they are already imported, so they are not imported a second time.

properties (sliders, colors, etc)

You can customize properties like effect controls, layer transforms etc. But since those elements cannot be renamed directly (you cannot rename the Position of a layer to $C Position, for example), Automation Blocks uses a little workaround:

After Effects has a category of Effects called Expression Controls. These effects just contain a single property - like a slider, a color picker, a point control etc. And since those effects (as with any effect) can be renamed, Automation Blocks looks for $ annotations on these expression controls. So, if you need a slider value in your spreadsheet, for example, you need to:

  1. Create a slider control effect from the Expression Controls category
  2. Pick-whip the properties that you want to control to this slider (i.e. create an expression link that connects the property that you actually want to control to this slider)
  3. Change the name of the slider control effect so that it starts with an annotation like $A.

This approach works not only with sliders, but with all types of expression controls.

comp names

You can also control the names of the comp duplicates. Here you can not only insert the $ annotation at the beginning, but anywhere in the comp name, and you can also have many of them. If your comp name is video $A with $C, then both the contents of column A and C are inserted into the comp name at the locations where the placeholders $A and $C are, respectively. Of course, the names of precomps may also inculde such placeholders.

Reusing the same placeholder multiple times

You can use the same placeholder multiple times. If the contents of column D should be used in both the comp name and the text of a text layer, for example, simply use $D in both of them.

Locking Precomp Layers

If you don't want a particular precomp to be duplicated, you can simply lock the precomp layer.

Step 2: Export Spreadsheet

After you've made all the annotations, make sure the active composition is the main composition of your template and then run the script export spreadsheet from template comp. It first asks where to save the spreadsheet (choose a filename ending with .csv) and then creates a spreadsheet based on the annotations you've made. If the template comp (or any precomp) contains a text layer with name $A Dog Name and text Daisy, for example, then column A will have the title Dog Name and a first entry with the text Daisy is placed below it.

Spreadsheet created by 'export spreadsheet from template comp'

You can open this spreadsheet in the spreadsheet app of your choice (Excel, Apple Numbers, Open Office, Google Docs) and add the data for all the comp variants you want to create:

Spreadsheet created by 'spreadsheet with data for all comps'

Step 3: Import Spreadsheet

After you've filled the spreadsheet with data, save it, making sure to keep the format as .csv. Now make sure the active composition is the main composition of your template and then run the Automation Blocks script create comp duplicates from spreadsheet. In the dialog that pops up, choose the spreadsheet file and then the script creates one duplicate of the comp (and precomps) for each row of the spreadsheet.

See also

Comp Duplicator

If you want to just create a duplicate of a composition including all precomps, but don't want to customize anything in the duplicate, you can use the Automation Blocks script "Comp Duplicator" instead.

Import/Export Texts from Spreadsheet

If you just want to replace the texts in a composition, the Text from/to Spreadsheet tools are also a good alternative.