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 / To create DataTable in...
Power Automate
Unanswered

To create DataTable in Power Automate Desktop

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

 

Can any one tell me ,

1) how e can add Datatable activity in Power automate desktop, ?

2) How we can store in dadatble variable, so that finally we write that variable into ExcelFile?

3) How to convert variable to Datatable?

 

 

 

 

Please help me!!

I have to store value in Excel file,Any suggestions/Hint will work.

 

Please give suggestions.

Thanks in Advance.

 

I have the same question (0)
  • Verified answer
    ryule Profile Picture
    929 Super User 2024 Season 1 on at

    Information on creating your own DataTable is located under "Datatable" under Advanced Data Types in this link:

     

    https://docs.microsoft.com/en-us/power-automate/desktop-flows/variable-data-types#advanced-data-types

     

    I, however, have not discovered a way to insert a variable into a custom datatable....so if anyone knows how to do that, I'm all ears. I've had to use Excel as a workaround, like you had mentioned.

  • Anjali_Rani Profile Picture
    on at

    Thanks, This helped a lot.

     

    Thank you so much. 🙂

  • amanwadhwa990 Profile Picture
    6 on at

    Use %vData + [rowd, rowdd]% where rowd , rowdd are variables and vData is datatable.

  • korebreach2022 Profile Picture
    21 on at

    The key to using variables to set items in a datatable (which makes little sense) is to remove the % signs from both ends of the variable.  Where you may think that %MyTable + [%variable1%, %variable2%]% would be correct, it's actually %MyTable + [variable1, variable2]% .  This is a strange quirk of the engine because if you enclose the variables in % signs (like you would do anywhere else) PAD will try to "pair" the % at the start of the first variable with the % at the start of the statement, essentially making a variable called, "%MyTable +[%". The information following that incorrect variable is then interpreted as garbage so it throws an error.

  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    Yes I have since discovered that; thanks! And I just saw they introduced some new DataTable actions, but haven't checked them out yet!

    https://powerautomate.microsoft.com/en-us/blog/power-automate-for-desktop-july-2022-update/

  • hoernchen Profile Picture
    21 on at

    Hi all, I have checked it out and I did not manage to add data to a data table row. Which format is needed to do that? My tries with a defined table of 4 colums were:

    2022-07-28 11_58_17-Window.jpg

     

    • 1,2,3,4
    • 1;2;3;4
    • "1";"2";"3";"4"
    • '1';'2';'3';'4'
    • 1+2+3+4
    • ['1'] + ......... 

    Any info how to solve that?

     

    @microsoft colleagues:

    • Would be great if those infos will be added directly to the info button next to each step, it's always a try and error
    • There's an option to delete a row, why isn't there a option to delete a column as well?
  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    I 100% agree with you that you should be able to insert new data directly into the table. I haven't figured out how to do it using these new Actions.

    I did discover you can insert a row into the datatable with a list, as long as the list has the same amount of rows as the datatable has columns.

    So for instance, below, I created a list with 3 rows of values, and then created a datatable with 3 columns, then inserted the list as a row, and it worked....

    ryule_0-1659025555454.png

     

  • JCiriello98 Profile Picture
    21 on at

    You came pretty close with your last try. It should look like this:

    JCiriello98_0-1659721281904.png

    So the format for a datarow is a comma separated list contained by square brackets inside of percentage signs.

    Note how ColumnNVariable are variable names containing the values DataN, while 'Data3' and 'Data4' are hardcoded values contained in single quotes.

     

    This is what the datatable looks like after the insert step has run:

    JCiriello98_1-1659721497901.png

    *I created the datatable with the InitN values already there before the insert happened.

  • JCiriello98 Profile Picture
    21 on at

    See my response to hoernchen above on how to insert a row to a data table without making a list first.

  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    can't believe i never tried that combination; nicely done, thank you!

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard