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 / OData Filtering on Exc...
Power Automate
Answered

OData Filtering on Excel Column with Spaces in Header

(0) ShareShare
ReportReport
Posted on by 2

I have successfully connected a flow to an Excel file that resides on SharePoint. 

 

Many of the table header names in the Excel file use two words, like "Product Name" or "Invoice Date".

 

When I attempt to use the OData filtering or ordering in the MS Flow Get Invoice Items app edit screen I can't seem to get the query right. 

 

For Order By I've tried:

  • Invoice Date desc
  • 'Invoice Date' desc
  • "Invoice Date" desc
  • Invoice%20Date desc
  • [Invoice Date] desc

All of which cause the flow to fail. I'd prefer to not have to change the source Excel table headers as MANY other systems depend on the stability of that file.

 

Can anyone tell me how to solve this conundrum?

 

GetInvoiceItems.png 

 

Many thanks,

- Steven

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,302 Most Valuable Professional on at

    @SteveD 

    You might try running the "Get Invoice Items" action without the Order By expression.  After the run, take a look at the output of this action and see how  Invoive Date is referred to in the output.  Use that same syntax in the Order By expression.

     

     

  • Verified answer
    RezaDorrani Profile Picture
    12,145 on at

    Hi @SteveD 

     

    Excel odata query / sort will not handle spaces 

    Your best bet will be to update the excel file and remove the spaces

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @SteveD ,

     

    Unfortunately, Excel-Filter Query/Order by does not currently support fields with spaces in the name.

    If you want similar features to be supported by MS Flow, please consider voting for similar idea below:

    https://powerusers.microsoft.com/t5/Flow-Ideas/Have-Consistency-in-on-Filter-Query-and-Order-By-on-Excel/idi-p/297122

     

    As an alternative to Filter Query, please consider using Filter array to filter rows.

    After using Filter array to filter rows, if you want to reference field values, you may need to use the expression.

    You could consider parsing the Body of Filter array using Parse JSON action first so that you could easily reference the corresponding field values.

    http://johnliu.net/blog/2018/6/a-thesis-on-the-parse-json-action-in-microsoft-flow

     

    Best Regards,

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 308 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 171 Super User 2026 Season 2

#3
Haque Profile Picture

Haque 137 Super User 2026 Season 2

Last 30 days Overall leaderboard