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 Platform Community / Forums / Power Automate / JSON to CSV and adding...
Power Automate
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

 

 

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,856 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard