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
Thank you so much @DamoBird365
Its working now
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 😉
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2