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 / Power Auotmate Extract...
Power Automate
Suggested Answer

Power Auotmate Extract Table Column Names

(2) ShareShare
ReportReport
Posted on by 56
 
Hi all - I have a power automate and I would like to automatically extract all the column names from an excel file formatted as table. I don't know in advance the column names as the ecel file will change each time. I managed to get the names of the column as the array below:
 
{
  "body": {
    "@odata.etag""",
    "ItemInternalId""4b864-f0ca-4bc8-7beae93-0622c47a00e0",
    "Name""Luca",
    "Surname""Russo",
    "Birth Date""27406",
    "City""Milan"
  }
}
 
Ans so the column names would be Name, Surname, Birth Date, City - basically everything apart from odata.etag and iteminternalid. 
 
Can you suggest a way to just extract everything apart from odata.etag and iteminternalid and so in this example just ame, Surname, Birth Date, City ?
 
Keep in mind that in anohter case I could have other colums. 
 
Categories:
I have the same question (0)
  • Suggested answer
    Pstork1 Profile Picture
    68,707 Most Valuable Professional on at
    Since you know the names of the two fields you want to remove you can use the removeProperty() function to remove those properties from the Body object.  here's the documentation on how to use it.  Reference guide for expression functions - Azure Logic Apps | Microsoft Learn

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
     
  • lbendlin Profile Picture
    8,479 Super User 2025 Season 2 on at
     I don't know in advance the column names as the ecel file will change each time.
    Will the table name be the same across files?
     
    Once you have the column names, what is the next step?
  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at
    You only need to know the names of the columns you want to remove, not all the columns.  The extra ones you want to get rid of will always be 
    "@odata.etag" and "ItemInternalId".
     
    The Table name may not be the same across all the files either. But you'll need that retrieve the columns anyway.
     
    Not sure what you mean by "Next Step". 
    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • hugojesus Profile Picture
    25 on at
    Hi everyone,
     
    Hope to found you well. 
     
    Assume your Excel row is stored in a variable or part of a previous step (like Get a row, List rows present in a table, etc.).
     
    Add a "Compose" action:
     
    Use this expression to extract the keys (column names) and remove unwanted ones.
     
    Expression:
     
    join(
        filter(
            keys(body('YourExcelStep')),
            item() != '@odata.etag' and item() != 'ItemInternalId'
        ),
        ','
    )
     
    - Replace 'YourExcelStep' with the name of the step that returns the row object (you can use Dynamic Content to select the output).
    - The join(...) will return a single comma-separated string like:
     
    Name,Surname,Birth Date,City
     
    If you prefer it as an array, remove join(...) and just use:
     
    filter(
        keys(body('YourExcelStep')),
        item() != '@odata.etag' and item() != 'ItemInternalId'
    )
     
    Best Regards,
    Hugo Jesus
  • lbendlin Profile Picture
    8,479 Super User 2025 Season 2 on at
    "  The template function 'keys' is not defined or not valid. "

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard