Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions pasting spreadsheet data into keyframes / linking spreadsheets to ae

  • pasting spreadsheet data into keyframes / linking spreadsheets to ae

    Posted by James Sandifer on August 10, 2020 at 12:43 pm

    I’m using after effects CC2020 on mac os 10.14.4

    Trying to create a bar chart race using data from a spreadsheet.

    Each bar is a shape layer path with trim paths attached. The % on the trim paths is the % for the data on each bar so to make the bar move up and down for each year that I have data I have to add a keyframe and input the percentage data. The chart covers 70 years and there are 48 bars so some shortcuts would be great.

    It would be nice to take a line of percentages from my spreadsheet and them paste those numbers onto the trim paths layer to create key frames.

    Is there a way that I can do this?

    Thanks in advance.
    James

    Tomas Bumbulevičius replied 5 years, 9 months ago 3 Members · 3 Replies
  • 3 Replies
  • Filip Vandueren

    August 10, 2020 at 5:14 pm

    If you don’t want to go the route of importing a csv or Json file,
    maybe you can do this:
    Add a marker to your Shape layer, and paste the row of data in the marker’s comments:
    10% 20% 90% 80% 55% 76% 12%

    Then this expression will create an array of the values:

    percentages = marker.key(1).comment.split("%\t").map( s => parseFloat(s));

    // quick example with some animation:
    t = clamp(Math.floor(time), 0, percentages.length -1 );
    fromP= percentages[t]
    toP= percentages[t+1];

    ease(time%1, 0.5, 1, fromP, toP);

  • James Sandifer

    August 11, 2020 at 9:29 am

    Thank you I’ll see if I can make that work.

  • Tomas Bumbulevičius

    August 12, 2020 at 9:18 am

    Hey Filip,

    but what about Y comparison between the lines? Do you have an idea for this?

    For me it looks like huge bottleneck to compare these with expressions as the author is planning to do one way or another!

    Find out more:
    Motion Graphics Design & After Effects Tutorials
    On YT
    On VH

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy