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 / How to insert DataTabl...
Power Automate
Answered

How to insert DataTable into Excel

(0) ShareShare
ReportReport
Posted on by 17

I've been using PAD For month now, I've been using insane amount of functions just to write datatable to excel instance.

 

like there is no function to write the whole datatable to excel directly rather than going through loop and doing it row by row and column by column.

 

is there any way to simplify this

Ziad_0-1640130462126.png

 

 

 

  • Verified answer
    Ziad Profile Picture
    17 on at

    NVM, it's when you post your question you end up finding the answer.

     

    it's not documented as DataTable to Excel that well just Write to excel.

    https://docs.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/excel#runmacro

     

    steps:

    - get first free row %ff%

    - write to excel function, just add the %ff% to the row and 1 to column and datatable to value to write

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Set Datatable to clipboard text

    Then, Paste cells to Excel worksheet (choose the upper left cell)

     

    This should paste the datatable in Excel, all in one column, but on separate rows.  Then, use the Excel UIs to have PAD do Text to Columns based on the proper delimiter.

     

    Good luck!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You can just write the entire DataTable variable to Excel (row 1, column 1).

    Columns need to be added separately though by looping through %Table.ColumnNames% property. In such a case, you would write entire table to row 2, column 1 and add columns to row 1, column %Table.ColumnNames[index] + 1%.

  • finuex Profile Picture
    2 on at

    I don't know if this helps you, but I have a suggestion, what if you save the table data into CSV, then you open the file using Excel?

    image.png

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 275 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 178 Super User 2026 Season 2

Last 30 days Overall leaderboard