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 / Save email attachment ...
Power Automate
Unanswered

Save email attachment to SharePoint if it does not contain specific text

(1) ShareShare
ReportReport
Posted on by 10
Hello,
 
I have a workflow that successfully saves emails with excel attachments with a specific name to a SharePoint folder.
However, sometimes the customer who's system automatically sends these emails contains an error leaving  a blank spreadsheet except for "No applicable data found" in a cell within the spreadsheet.
 
How can I adapt my workflow so that it only saves the spreadsheets with data, excluding those containing "No applicable data found" please?
 
I tried to add a condition row using the dynamic expression "Attachments content" does not contain "No applicable data found" but this didn't make any difference.
 
Can anyone help please, many thanks.
Categories:
I have the same question (0)
  • Suggested answer
    vipuljain03 Profile Picture
    647 Super User 2025 Season 2 on at
    It seems you need to check the content inside the file before saving it to SharePoint. Since "Attachments content" refers to the raw file binary and not the actual text inside the spreadsheet, your condition didn't worked as expected.
     
    Firstly, you need to extract the content from Excel file.
    • Use the "Create file" action (temporary storage in OneDrive/SharePoint).
    • Use the "List rows present in a table" action (Excel connector) to read the data
    Secondly, Check for "No applicable data found"
    • Add a "Condition" action to check if the retrieved data contains "No applicable data found".
    • If it does, do nothing (skip saving).
    • If it does not, proceed with saving the attachment to SharePoint.
    Later, you can delete the temporary file i.e. after processing.
     
  • AP-15010916-0 Profile Picture
    10 on at
    Thank you  but unfortunately doesn't work, I think due to the Excel file being .xlsm format - the files are not showing when I try to use the suggested "List rows present in a table" option and try to select the file.
    Another potential issue is that the data isn't set in a table, but is freeform in the sheet, would this mean the "List Rows present in a table" feature wouldn't work presumably?
  • Verified answer
    vipuljain03 Profile Picture
    647 Super User 2025 Season 2 on at
    @AP-15010916-0 - yes the issue is related to .xlsm files, because "List rows present in a table" action works with .xlsx files. Power Automate doesn’t support .xlsm files natively for listing rows.
     
    Additionally, the "List rows present in a table" action requires data to be inside an Excel table. If the data is just freeform in the sheet, this action won't detect or process it.
     
    Workaround would be to convert .xlsm files to .xlsx. You can do this via Power Automate also.
     
    ------------------------------------------------------------
    Please mark this reply as verified if it answers your query.

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard