logo
search
File Cannot Open

Fix Power Automate Creates an Excel File That Cannot Be Opened

John WilsonJohn Wilson Sep 27, 2026 869 views

Question details

Users are unable to open Excel files generated via Power Automate flows because the resulting file is invalid or corrupted.

How to Fix Power Automate Creating Unopenable Excel Files
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.
Before you start

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.

Solution 1Recommended

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.

1
Check the source template

Manually open the source Excel template used by the flow to ensure it is valid and uncorrupted before the automation process begins.

2
Use binary file content

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.

3
Confirm the file extension

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.

Verify File Content and Extension Settings
Format Matching: Matching the binary content to the exact file extension prevents Excel from throwing a file format mismatch error when you attempt to open it.
Free Microsoft Office alternative

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. 1. Download and Install: Get WPS Office for free from the official website and follow the simple installation instructions.
  2. 2. Open your Spreadsheet: Launch WPS Spreadsheets and open the recovered or manually downloaded .xlsx file to view your data.
  3. 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.
Highly compatible with Microsoft Excel formats including .xlsx, .xls, and .csvLightweight architecture ensures large datasets load quickly and smoothlyCompletely free to use with a familiar, easy-to-navigate tabbed interfaceCross-platform support allows you to edit files on Windows, Mac, Linux, iOS, and Android
microsoft office alternative - wps office

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.