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 / Datatable column name ...
Power Automate
Unanswered

Datatable column name to excel

(0) ShareShare
ReportReport
Posted on by 29

Hello, 
Im saving datatable Values to excel im trying to get the column names as well but never worked, 
, one more thing i when i create new data table always empty row at index 0 is that common bug? i remove it manually 

HazemSaleh_0-1669296305478.png

 

I have the same question (0)
  • HazemSaleh Profile Picture
    29 on at

    And the sorting looks wrong ex. Value date should be the last cloumn when i save excel show as the 4th column.

  • rfinkley Profile Picture
    31 on at

    I had to do something similar recently. I used the 'Write to Excel worksheet' action and chose the .ColumnHeadersRow property for the data table variable I wanted to write to Excel. Then I used the 'Get first free row on column from Excel worksheet' action and used that in the Row field of a new 'Write to Excel worksheet' action, where I used the entire data table variable as the values I wanted to write. 

    On a side note I'm still trying to figure out how to keep the data table from being created with an empty row.

    Update: 
    So to answer your second question regarding the empty data table row, it has to do with how you create the data table. If you use the 'Create new data table' action you have to use the visual builder to populate the table columns and it expects at least the first row of data to be populated as well. If you leave the first row blank you'll end up with an empty row. 

    The other way of creating a data table is using the 'Set Variable' action to create an empty data table. You can even create the headers. You then populate the data table the same way you had been. Here's a link to docs.

    Variable data types 

    rfinkley_0-1669313129983.png

     



  • Dwarka Profile Picture
    18 on at

    In order to write the datatable with Headers into you excel with PAD.

    You need to use two write excel actions i believe, In first one you will be adding column headers and second one you will be adding the actual datatable.

     

    Dwarka_0-1701421776258.png

     

    Dwarka_2-1701422099993.png

     

     

  • Riyaz_riz11 Profile Picture
    4,214 Super User 2026 Season 1 on at

    Hello @HazemSaleh 

     

    if you are saving data one time daily means you can try with method

    Ahammad_Riyaz_0-1701422413223.png

     

    Everytime new excel that will work, else you need to append daily basis and file should be created once go with condition else you can use datatable option from PAD, else make a template with header and while running take the copy of that file into output folder and paste, if you are using as template the header you can modify name as you required.

     

    IF it woks mark as solution 

    Regards,

     Ahammad Riyaz

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 223

#2
David_MA Profile Picture

David_MA 195 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 167

Last 30 days Overall leaderboard