Skip to main content
amirt94372029
New Participant
August 26, 2020
Question

Get the rows count of csv file

  • August 26, 2020
  • 1 reply
  • 1058 views

Hello everyone

I need to get the rows count of a csv file. I can do this with layers but I need to get this count from footage.

 

this is the example with layers:

thisComp.layer("data.csv")("Data")("Number of Rows");

but I need something like this:

footage("data.csv")("Data")("Number of Rows");

 

This topic has been closed for replies.

1 reply

Tomas Sinkunas
Brainiac
August 26, 2020

I'm not sure if this is doable.

One workaround for this is to:

- dump footage item into a composition,

- read value as you were doing in your first example,

- remove the CSV layer.

amirt94372029
New Participant
August 26, 2020

still not what I want, when I add data to composition its not real time and when data changes after effects gives me warning while when I use footage() data updates automatically.

Tomas Sinkunas
Brainiac
August 26, 2020

Ok, what about this scenario:

1. Get the source file of you CSV item by using app.project.item(index).filehttp://docs.aenhancers.com/items/footageitem/#footageitem-file

2. Parse the CSV data with ExtendScript,

3. Done.