![](banner.png)
CompsFromSpreadsheet for After effects
Get data from your spreadsheet into your After Effects comps automatically
Download 7 Day Trial User Guide Other Scripts |
Automated Versioning of your CompsVersion 5 available now Getting Started![]()
So if you click on the button to create text object and type "title" in the window, After Effects will create a text layer named "^title" in the currently selected comp. Setting up your Spreadsheet![]() The first line of your spreadsheet must contain the names for each column. When you run the script it will take each of these column names and and allow you to connect that column with elements in your template comp. If you name the columns the same name as the layers they are going to update, these items will automatically be selected. After you do this the script will go through the spreadsheet line by line, each line of the spreadsheet will become a new copy of one of your template comps, with data from that line of the spreadsheet updating the layers in the template comp copy that were targeted to receive it. If you have more than one composition in your project, you will need to have a column in your spreadsheet that holds the name of the comp to be used as the base. You should name the column 'comp'. Before After effects can read your spreadsheet, it needs to be converted into a tab-delimited text file (most spreadsheet programs do this easily). This is a universal text format that will allow After effects to read in your data and organize it by rows and columns. When you run the script be sure to point it to this newly created text file and not your spreadsheet as After Effects cannot read any spreadsheet format (maybe I should call the script compsFromTabDelimitedTextFile). If you have commas in your data, they will probably get stripped. Why? I believe it is a bug in Excel. There are two major types of delimited text documents, tab-delimited (which we are using) and comma delimited text. If using a comma-delimited format, commas are used to separate columns, if there happens to be a comma in your data, the program will need to strip them out prior to saving as they will be falsely interpreted as the end of that column. If saving as tab-delimited, tabs would likewise need to be stripped out from your data. Commas are fine and should not be removed, as they are NOT a separator. Sadly, Excel still strips out commas, even when you are saving as a Tab-Delimited text file. To overcome this limitation, if you need a comma in a text field write <c> and the script will replace that with a comma. Running the Script![]() Once you select the tab-delimited text file, the script will read the first line of it which needs to contain the names of all the columns. The field init window will pop up to allow you to sync the data in the text file to target layers in your comp. Synching Column Data to your Comp![]() When the script reads the first line of your spreadsheet, it needs you to tell it where the data from each column should go in your comp. The Field Init window opens. Each column name from the first line of the spreadsheet appears with a dropdown box underneath. The dropdown box links the data from that column in the spreadsheet to elements in your template comps. The dropdown box contains the names of all the layers that were set up earlier to receive data (remember, the text layers that started with ^ will receive the data from this column, layers with a # will be replaced with the project item named in this column, and layers with > will be replaced by files imported from the location specified in the column.) If a column name is the same as an element name in one of your comps, that will be automatically selected in the dropdown i.e. If you have a column in your spreadsheet "phone" and a text layer in one of your template comps named "^phone", that item will be automatically selected in the dropdown box. If however, your text layer is "^phone number" it will not be selected in the dropdown box. If you have more than one comp to be used you will need to have a column in your spreadsheet with the name of the comp to be used for that line. Select 'COMP' from the dropdown box of the column that holds comp names, if you only have comp to be used 'COMP' will not appear in the dropdown as the script will already know which comp to use. Importing Files Via Spreadsheet![]() You can have layers in your comps be replaced by files that are not in your project. Any layer that begins with > will be replaced by a file imported from the path specified in your spreadsheet. To get the proper path format of a file click on the "Get File Path" button located in the main compsFromSpreadsheet window. When you click this button a window will pop up asking you to navigate to your file; when you click ok the proper path to this file will appear in a window that you can copy and then paste into your spreadsheet. When the script runs it will import the file from the location specified in the spreadsheet and replace the layer. If you have the same file more than once in the spreadsheet it will only be imported once, and that copy will be used each time that particular file is referenced. Naming Comps![]() The next step you need to tell the script how to name the newly created sequence, and where you want the rendered sequences to go. The default naming convention is line number, so the name of the very first Comp is "2" ( because line 1 holds the column names). and the next comp created is called "3" and so on until it reaches the last line of the spreadsheet. Alternately you can have the script keep the name of the original template comp and append a number to the end. so the first time the script creates a comp from "TemplateA" it is named "TemplateA_1", next line that uses that comp will name the new comp "TemplateA_2" Lastly, you can choose to get the name from one of your spreadsheet columns. So if you choose "FROM SPREADSHEET | name" from the dropdown, the comp will get its name from the 'name' column of the spreadsheet. Render Settings![]() By default, every comp created by the script will be placed in the render que using the default settings for your render que. It will default to saving the renders in the same directory as your project. If you don't want your new comps put in the render que you can turn this off in the settings. If you click the "Render Settings" button (on the "field init" window) you can select which render setting and output module to use for the script and where to put the rendered files. If you check the "Remember Settings" box these settings will be used every time tyou run compsFromSpreadsheet; if not checked, these settings will be used in the current run. Settings![]() You can also set the number of columns that appear in the field init window. And you can also change render settings from here, or uncheck the "add new comps to render que" to bypas this altogether and just crerate comps. The date format section allows you to change the defualt date format. The default format is MM/DD/YYYY, you can change the order or have month names used instead of numerical (currently this only has english names for the months. If there is enough interest I will add multi language support in a future release). ConclusionHit the render button and all your newly created comps will render (go out for a pint while it renders!) Installing CompsFromSpreadsheetLicensing |