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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

JSON to CSV and adding row numbers

(0) ShareShare
ReportReport
Posted on by 35

Is there a way to add row numbers to a CSV table? I don't see any way to do that with the "Create CSV table". Could it be an option to make a low-level code via "Apply to each" to parse JSON into a table where a variable is incremented for each row?

 

The JSON data comes from Power Apps, and contains a table within a table. To simplify a bit, the structure is like this:

 

Account_WeekAccountWeekTimesheet
101_5210152
ProjectEmployeeDays
2312Dave5
3413Sheila8

 

So the output file should look something like this:

 

Account number: 101, Week number: 52

Line number, Project, Employee, Days

1, 2312, Dave, 5

2, 2313, Sheila, 8

 

Right now I have an "Apply to each" for Account, and "Create CSV table" to make the timesheet (GroupedItems)

 

flow.PNG

 

 

I have the same question (0)
  • abm abm Profile Picture
    32,600 Most Valuable Professional on at
    Re: JSON to CSV and adding row numbers

    Hi @sniagsh 

     

    I can see you have two kind of headers here

     

    Account number: 101, Week number: 52

     

    and

     

    Line number, Project, Employee, Days

     

    Not really a CSV format output this is.

     

    But if you Parse the JSON and use a custom append string you might be able to achieve the format you needed.

     

    If you post a sample format of your JSON file I could try to find a solution for you.

     

    Thanks

  • sniagsh Profile Picture
    35 on at
    Re: JSON to CSV and adding row numbers

    Thank you, but I found a way to add row numbers in Power Apps. I prefer to keep most of the processing in the app anyway since I find it hard to view and edit code in flows.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 614 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 401 Moderator

#3
chiaraalina Profile Picture

chiaraalina 282

Last 30 days Overall leaderboard