Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Get the rows count of csv file

New Here ,
Aug 26, 2020 Aug 26, 2020

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");

 

TOPICS
Error or problem , Expressions , Scripting
994
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 26, 2020 Aug 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 26, 2020 Aug 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 26, 2020 Aug 26, 2020
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines