Skip to main content
Participant
Oct 28, 2026 5:49 PM UTC
Answered

thisComp.layer("YourFileName.csv")("Data")("Number of Rows"); only exposes 16 rows of the csv

When using a csv to populate titles, I was getting a row count using thisComp.layer("YourFileName.csv")("Data")("Number of Rows");

However, this is only returning 16 rows when the csv contains more (and no spaces or special characters are the problem).

After Effects 26.5

    David.Arbor
    David.ArborCorrect answer
    Community Manager
    Oct 29, 2026 8:24 PM UTC

    @Brooks376011229ub1 Ah! Well I’m glad it’s working as-expected. The reason the value doesn’t update when you reload the file is because it’s interactive and keyframable. You’d be pretty unhappy if you keyframed or manually set that value to something specific and it changed every time.


    In your case, since you always want to display the max value, you have two options with expressions:

    1. If you were pointing a text layer to the Number of Rows property before, you could bypass it and instead put this value on your sourceText. Note the “Outline” group is necessary here. If you pick whipped directly to a chapter’s value, you’d see it too.
      thisComp.layer("Chapters.csv")("Data")("Outline")("Chapter Titles").numProperties
    2. If you really wanted the Number of Rows property to show the correct value, you could put this expression on it:
    3. thisLayer("Data")("Outline")("Chapter Titles").numProperties

      You could then pick whip your text layer’s sourceText to this row, but that’s an unnecessary additional expression. 

    -David, After Effects Engineering Team 

    6 replies

    Participant
    Oct 28, 2026 9:01 PM UTC

    Win 11, if it matters

    Translate
    David.Arbor
    Community Manager
    Community Manager
    Oct 29, 2026 4:04 PM UTC

    Hi ​@Brooks376011229ub1, if you twirl the CSV’s Data group open in the Timeline, do you see only see 16 rows? I just confirmed it works on macOS and Windows in 26.5 with a CSV containing 30 rows.

    Would you mind attaching the file here?

     

    -David, After Effects Engineering Team

    Translate
    Participant
    Oct 29, 2026 4:23 PM UTC

    I see more that 16 “Chapter Titles” however, under Data > Number of Rows it only shows 16.
    If I drag/slide it higher, it will go to 21 (the correct number).

    So my apologies if that’s the intended use; to limit the rows data.
    I was using it as a source of truth.
    I just assumed that it would automatically update to the actual row number once your reloaded the file but it looks like it stays fixed on the first import number.

    I have since switched to using the JS constant:
    const totalRows = csvFootage.sourceText.split(/\n(?=\S)/g).length - 1;

    Open to suggestions,
    -Brooks

    Translate