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 / Convert a data table (...
Power Automate
Answered

Convert a data table (with multiple rows) to JSON

(0) ShareShare
ReportReport
Posted on by 69

Hello,

 

I've been researching the best way to convert a data table from excel (with multiple rows) to JSON.

 

I found a solution on here that appears to "mostly" work, but I am not familiar with JSON to know if it's converting multiple rows correctly.

 

Here is the data table that I am starting with (from excel)

Ckatz_0-1664543483116.png

Here are the steps I took to convert this to JSON

 

Step 1: Created an Output variable called INVObject and type is Custom Object

Question: Wasn't sure how to create a regular variable that wasn't part of another action?

 

Ckatz_2-1664543689556.png

Step 2: Set variable called INVObject to be empty to initialize it

Ckatz_3-1664543816769.png

 

Step 3: Added a For each to loop through each Data Row in the Data Table

Step 4: Added a Set Variable to set the INVObject (Custom Object) to the Data Table for each loop in the For each

Ckatz_4-1664543917124.png

 

Step 5: Convert the Custom Object INVObject to JSON

Ckatz_5-1664544015852.png

 

Results: There is one row/object with all 3 rows from the Data table on the same row.

Ckatz_6-1664544108602.png

If you scroll to the right, the 2nd row eventually starts and then the 3rd row.

I was expecting to see 3 lines/rows/object to represent the 3 different rows in the Data table.

Can someone provide some insight as to if I am doing something wrong or if this is the expected results for multiple rows?

 

Thank You!

 

 

I have the same question (0)
  • Verified answer
    Kaif_Siddique Profile Picture
    2,108 Super User 2024 Season 1 on at

    Hi @Ckatz ,

     

    Refer this link to Convert DataTable to Json Object:

    https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Data-Table-to-JSON-object-in-PAD/td-p/1323354

     

    Hope this will help you.

     

    Regards

    Kaif

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 780

#2
Valantis Profile Picture

Valantis 668

#3
Haque Profile Picture

Haque 601

Last 30 days Overall leaderboard