Announcements
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
Hi @Christo1
Try this :
Result is
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 😉
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
trice602 248 Super User 2026 Season 1
David_MA 207 Super User 2026 Season 1
Power Platform 1919 101 Super User 2026 Season 1