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 Add and Handle ...
Power Automate
Unanswered

How to Add and Handle Excel Sheets that have changing numbers of Columns

(1) ShareShare
ReportReport
Posted on by 13

I am developing a flow that will accept an Excel spreadsheet from a user and then extract certain data from the spreadsheet to be used elsewhere. The issue is that the number of columns and the headings of the columns in the spreadsheets are not constant. The first two columns are always the same, but the sheet can include as many as 18 other columns, depending on the user who is submitting it. 

 

Any ideas welcome. Thanks

Categories:
  • trice602 Profile Picture
    16,699 Super User 2026 Season 2 on at

    Hi @LeeJW5 ,

     

    You can accomplish this by adding a list rows present in a table action as needed.  This action will recapture the newly added columns (and column name changes) on-demand in real-time so no issues.  The requirement is that your data is in a table not a range.

     

     

     

     

  • LeeJW5 Profile Picture
    13 on at

    That's what I've been doing on my initial build, but a list rows present in a table action I've been using has a static input. For example, I direct the action to one specific file. 

     

    I guess I have a couple of follow up questions:

     

    1. Is there a way to set up a trigger so that if someone one posts a spreadsheet to a SharePoint library, my flow can grab the spreadsheet and process it for the data I need?

     

    2. I'm currently using Parse JSON and Select operations to refine my Filter Array to give me just the information I need, but those functions use the names of the columns to clear out the garbage I don't need. 

     

    LeeJW5_1-1702566003913.png

    This is how the Select function is written.

     

    LeeJW5_2-1702566091496.png

     

     

     

  • LeeJW5 Profile Picture
    13 on at

    Please disregard question 2. I just realized I don't need the Parse JSON or Select operations at all. I managed to make the Filter Array so specific that it gives me exactly what I need! Thanks for you answer, it got me thinking about the problem differently. I still need to figure out the proper way to make the trigger function though.

  • trice602 Profile Picture
    16,699 Super User 2026 Season 2 on at

    Hi @LeeJW5 ,

     

    Please mark my answer as a solution to help others find it.

     

    Ok for the trigger, you can use something like when a file is created.

     

    trice602_0-1702566977701.png

     

     

    Next list rows present in a table, use filter query directly in this action (if needed). 

     

    Next use your filter array (if you need it)...etc, etc

     

     

  • LeeJW5 Profile Picture
    13 on at

    Oops! Looks like I do need the Parse and Select operations, but as mentioned they are built around "static" column names for the spreadsheet I have been using for testing. Another action I was using to upload a file to SharePoint was not functioning properly and made it appear the filter was completing the action. I will try the trigger recommendation though. Thanks!

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
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard