Skip to main content
Community site session details

Community site session details

Session Id : m4qiRYa/3AJq7i9kBqm9ET
Power Automate - General Discussion
Answered

How to count number of cells in first row of csv file

Like (0) ShareShare
ReportReport
Posted on 30 Jun 2021 05:18:27 by 27

How to count number of cells in first row of csv file using power automate?

Scenario will be like 

When an CSV file is created on one drive count no of cells in first row of csv file

  • Christo1 Profile Picture
    27 on 01 Jul 2021 at 08:50:10
    Re: How to count number of cells in first row of csv file

    Thank you so much @DamoBird365 

    Its working now

  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on 01 Jul 2021 at 06:16:55
    Re: How to count number of cells in first row of csv file

    Hi @Christo1 

     

    Try this :

    DamoBird365_0-1625120011931.png

     

    Result is 

     

    DamoBird365_1-1625120076863.png

     

    I have intitially split the CSV by a return line (literally a single return - i.e. press your return key on keyboard in a compose).  This I choose the first line as object 0 and split by a comma.  Then I take the length.

     

    This is worth reading https://www.damobird365.com/how-to-parse-a-csv-to-json-array-flow

    depending on where you CSV comes from, the encodig of the return line might not be as straightforward as a return line on a keyboard.

     

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


    P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete