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 / Excel In the Power Aut...
Power Automate
Unanswered

Excel In the Power Automate Desktop flow Read data with empty or without empty

(0) ShareShare
ReportReport
Posted on by 203

Hi Everyone,

 

In the Power Automate Desktop flow, after launching Excel, the automation needs to read data from columns A2 to H2. If data is found in these cells, the flow should proceed with the next steps. However, if any blank cells are encountered, the flow should move to the next loop. Could you please assist with this.

 

Best Regards 

Muzamil Ahmed

I have the same question (0)
  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Well, once you have read your data from Excel, use a loop to iterate through each cell and check if the value of that cell is empty. If it is, use Next loop to skip the rest of the actions inside the loop.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • Verified answer
    Ahmedmuz Profile Picture
    203 on at

    HI Agnius,

     

    Thanks a lot - If you could show a sample with snap how to use the loop iterate through each cell with one example it will very helpful, as i am a very new to all this ,, Appreciate your help 🙂

     

    Thanks a million times:)

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    The following steps will do it, but depending on what you want to do with the values, you might want to use a different loop (if you need a loop index to write back to Excel):

    Agnius_0-1689998551197.png

    Also, this assumes that you are only reading a single row (A2 through H2). That's why it's iterating through a single row, too (using %ExcelData[0]%). If you read more than that, you would need an extra loop and the flow would look like this:

    Agnius_1-1689998655836.png

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • Ahmedmuz Profile Picture
    203 on at

    Hi Agnius,

    Thanks for the above snap shots, I tried but its not working the the close excel & its not going to next loop can you please check once and help where im doing error - attached is the snap shot for you,,

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Why are you closing Excel in the loop? You should only close it after you're completely done with what you want to do. And you only need to close it once - not within the loop.

  • Verified answer
    Ahmedmuz Profile Picture
    203 on at

    Capture-12345.PNGCapture-123456.PNGOk Sure, I want the open excel file should close if that is empty once it read then go to next loop or else it will be kept open so,, Can you help me how to do that ? 
    Have attached snap shot's for your reference.

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I do not fully understand your use case, but regardless of what you are trying to do, there are at least 2 things wrong with your flow:

    • You use %CurrentItem% in both of your loops. You should change the name of the variable either in the parent loop for files or the nested loop for Excel rows.
    • You have Close Excel in row 6 and 12. The action in row 6 will close the file before it stops using it. You are either missing some actions there, to skip to the next file after closing, or should not have the Close Excel action there.

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

     

  • Ahmedmuz Profile Picture
    203 on at

    If you don't mind can you give a proper step snap shots as new it will help a lot for me please...?

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    No, I cannot, because I don't understand what you are trying to do. Please provide a clear step-by-step instruction of what you want to achieve and then maybe I can come up with a suggestion for the flow.

  • Ahmedmuz Profile Picture
    203 on at

    1.Opening the excel Files one by one using the for each loop after Get files in folders step.
    2.If the file name contains 12345 it should not open the file and go to next Loop.
    3.Other than 12345 file name contains it should open - which is No 6 Launch Excel.
    4.No 7th Step is reading the excel file from A2 to H2 row.

    5.Created one more For each loop steps 8 within in For each loop  - to perform- If the current excel file cells from A2 to H2 is empty then current excel file should close and go to next loop - to open next excel file.

     

    Hope it helps you..

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard