Forum Discussion

john121's avatar
john121
Frequent Visitor
3 years ago
Solved

Folder wise CSV file record counts

I have 3 folders- India ,Germany and US. Each folder contains multiples files.

I have to give the Folder wise total record count.

For eg: India has 3 files - File1 has 5 rows,File2 has 6 rows and File3 has 3 rows, Then Total record count for India would be 14.

 

Now the Problem is when files are in .xlsx format and using excel.workbook function and then Table.columncount function I get the 

counts which works fine.

But when there are .csv files I get the error - DataFormat.Error: External table is not in the expected format.

Let me know how can i do this for .csv files.

 

Thanks!

 

  • Hi john121 ,

     

    Please try:

    Csv.Document([Content])

     

    Best regards,

    Yadong Fang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Hi john121 ,

     

    Has your problem been solved? If solved, please consider Accept it as the solution to help the other members find it more quickly.

     

    Best regards,

    Yadong Fang

2 Replies

  • v-yadongf-msft's avatar
    v-yadongf-msft
    Community Support

    Hi john121 ,

     

    Please try:

    Csv.Document([Content])

     

    Best regards,

    Yadong Fang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-yadongf-msft's avatar
    v-yadongf-msft
    Community Support

    Hi john121 ,

     

    Has your problem been solved? If solved, please consider Accept it as the solution to help the other members find it more quickly.

     

    Best regards,

    Yadong Fang