Fix Power Automate Creates an Excel File That Cannot Be Opened
Question details
Users are unable to open Excel files generated via Power Automate flows because the resulting file is invalid or corrupted.

- Product
- Power Automate / Excel
- Device & OS
- not provided
- Scenario
- Creating an Excel file using SharePoint and attaching it to an email automatically via a Power Automate flow.
- Observed behavior
- The Power Automate flow completes successfully without errors, but the generated Excel file cannot be opened by spreadsheet applications due to an invalid format or corrupted content.
Ensure you have edit access to the affected Power Automate flow and verify that the original Excel template used in the automation can be opened manually without errors.
Verify File Content and Extension Settings
Ensure the flow generates binary file content and matches the correct file extension in the Create file action.
A common cause of unopenable Excel files in Power Automate is writing plain text or JSON data into a file with an .xlsx extension. Excel files require binary content to function properly.
Manually open the source Excel template used by the flow to ensure it is valid and uncorrupted before the automation process begins.
In your 'Create file' action, ensure the 'File Content' field maps to actual binary data. You should pass the dynamic content from a 'Get file content' action rather than typing plain text.
Check the 'File Name' field in the 'Create file' action. Ensure it explicitly ends with the .xlsx extension and that this matches the actual format of the binary data being written.

Adjust SharePoint and Email Attachment Logic
Fix issues where files are attached to emails before SharePoint finishes creating the valid binary file.
Request Expert Flow Analysis
Escalate complex flow configuration issues to the Microsoft Power Platform Community.
Open and Edit Excel Files Seamlessly with WPS Office
While resolving Power Automate flow issues, you can rely on WPS Office as a lightweight, fast, and completely free alternative to view, edit, and manage your spreadsheets with full compatibility.
- 1. Download and Install: Get WPS Office for free from the official website and follow the simple installation instructions.
- 2. Open your Spreadsheet: Launch WPS Spreadsheets and open the recovered or manually downloaded .xlsx file to view your data.
- 3. Edit with Full Compatibility: Make modifications to your data, formulas, and charts, then save the file knowing it will remain fully compatible with Microsoft Excel.

Frequently Asked Questions
Why does my emailed Excel attachment from Power Automate say it is corrupted?
This usually happens because the flow attached the file to the email before SharePoint finished writing the binary data, or because it mapped plain JSON text into the attachment content instead of using the actual binary file content.
How do I ensure Power Automate creates a valid .xlsx file?
Make sure the 'Create file' action uses dynamic binary file content retrieved from your template or data source, and explicitly name the file with the .xlsx extension in the filename parameter.
Can I test the generated Excel file without running the full email flow?
Yes. You can run the flow manually and check the target SharePoint document library directly. If the file opens correctly in SharePoint, the issue lies in how the email attachment step is configured.




