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

Notifications

Announcements

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

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard