Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

How to Filter Out Blank Rows from Excel

(0) ShareShare
ReportReport
Posted on by 4,972 Super User 2025 Season 1

An Excel attachment arrives in an email box.

A peer has a flow that moves the attachment content to an Excel document in OneDrive.

That flow is
 formatted so that the Excel 'table' parameters are A:O, rather than A1:O500 (for example).

I have a flow that pulls the content from the OneDrive Excel document and updates SPList1.

As currently formatted (I have no control over fixing the table parameters), this causes SPList1 to have dozens of blank rows.


Is there a way, I my end, that I can filter/query OUT - in my 'List rows present in a table' or elsewhere, the blank rows coming in, so as to not populate SPList1 with dozens of blank rows?

The return is 947 when there are actually only 606 items/rows with content.

How can I update the formula to NOT count the blank rows?

  • Phineas Profile Picture
    4,972 Super User 2025 Season 1 on at
    Re: How to Filter Out Blank Rows from Excel

    I applied your solution.

     

    It appears to be working.

     

    Thank you.

  • Verified answer
    v-wenjuan-msft Profile Picture
    Microsoft Employee on at
    Re: How to Filter Out Blank Rows from Excel

    Hi @Phineas ,

     

    May I know is there any progress or do you need any further help?

     

    Community Support Team _ Wenjuan Zou

    If this post helps, then please consider Accept it as the solutioto help the other members find it.

  • Verified answer
    v-wenjuan-msft Profile Picture
    Microsoft Employee on at
    Re: How to Filter Out Blank Rows from Excel

    Correct.

     

    Does it work for you? You may mark the thread as resolved if my solution works for you.

     

    Community Support Team _ Wenjuan Zou

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

  • Phineas Profile Picture
    4,972 Super User 2025 Season 1 on at
    Re: How to Filter Out Blank Rows from Excel

    Just so I understand, the 'length' expression is what is filtering out the blanks, yes?

    Meaning, if I know of a column that is blank through all rows that are blank I should use that column in the filter array 'length' expression, yes?

  • v-wenjuan-msft Profile Picture
    Microsoft Employee on at
    Re: How to Filter Out Blank Rows from Excel

    Hi @Phineas ï¼Œ

     

    What you would like to do is to retrieve data from Excel and remove the blank rows, then add the remaining ones into a SharePoint list, right?

    Refer to my demo for solution:

    vwenjuanmsft_0-1686103272572.png

     

    In my test data, if column E is blank, the row will be blank. So I filter out rows owning blank E, and operate on the remaining rows next.

     

    length(item()?['E'])

     

     

    Here's test data and result:

    vwenjuanmsft_1-1686103387328.png

     

    vwenjuanmsft_2-1686103398107.png

     

    Community Support Team _ Wenjuan Zou

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

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492