Get the rows count of csv file
Copy link to clipboard
Copied
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");
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Ok, what about this scenario:
1. Get the source file of you CSV item by using app.project.item(index).file: http://docs.aenhancers.com/items/footageitem/#footageitem-file
2. Parse the CSV data with ExtendScript,
3. Done.

