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 / Problem saving excel f...
Power Automate
Suggested Answer

Problem saving excel file from outlook

(1) ShareShare
ReportReport
Posted on by 5
Hello everyone 
 
I’m writing because I want to create a workflow to save an excel attachment from an outlook email to sharepoint based on the email subject 
However I’m stuck because the created file won’t open on the desktop application Excel (corrupted file). It works fine in a browser. Do you know how to fix this ?
Thank you for your help
Maxime
Categories:
I have the same question (0)
  • Suggested answer
    trice602 Profile Picture
    16,298 Super User 2026 Season 1 on at
    Hi there!
     
    The root cause is typically the content bytes of the file.  In many cases, Excel Web will open the file, but not the case in Desktop App.  BUT you can fix this pretty quickly, there's the flow.
     
    Start with a trigger and make sure to Include Attachments/Only With Attachments = YES
     
    That's going to bring over the content bytes in the format you need.
     
     
    Next add the Create file action.  As you know, this is going to wrap itself in a "For Each" loop because there may be more than one attachment...so for each attachment, create file.
     
    The dynamic content you are selecting is the attachment name and content bytes.
     
     
    You can do more here with trigger conditions and standard condition actions, such as checking if the attachment is an Excel file, etc, etc but this is enough to resolve your content byte issue.  Build, duplicate, save, and test.
     
    As the old saying goes....works in testing!
     

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

     

     

    ⭐ If this was helpful, please like and check the box below "Does this answer your question" to help others find this too!

     

     

    Always glad to help! 💯💯💯💯💯

     

    Tom

     

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

  • CU04022146-0 Profile Picture
    5 on at
    Thank you for your response. I can now save the Excel file.
    However, I consult this file via a Power Query to perform analyses.
    But I cannot refresh the Power Query query; I get an error message: The key did not match any row in the table

    I think the saving is not being done correctly.

    If I test by saving the attachment myself and querying through Power Query, the query updates correctly.

    Moreover, when it works, I have files being created in the background with strange names.
     
    I still need your help. Maxime

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard