web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to count number of...
Power Automate
Answered

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

(0) ShareShare
ReportReport
Posted on 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

Categories:
I have the same question (0)
  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    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 😉

     

     

  • Christo1 Profile Picture
    27 on at

    Thank you so much @DamoBird365 

    Its working now

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 293

#2
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 223 Most Valuable Professional

Last 30 days Overall leaderboard