logo
search
File Format & Compatibility

How to Fix Invalid File Format Errors for Excel in Power Automate

Rana GarciaRana Garcia Sep 28, 2026 869 views

Question details

The user needs to resolve an issue where an Excel file transferred via a Power Automate flow cannot be opened due to an invalid file format or extension error.

Fix Invalid File Format Errors in Power Automate Excel Files
Product
Power Automate / Microsoft Excel
Device & OS
not provided
Scenario
Automating the transfer of Outlook .xlsx email attachments to a SharePoint folder using a Power Automate workflow.
Observed behavior
The Power Automate flow reports a successful run, but the resulting Excel file in SharePoint is corrupted and fails to open, displaying an invalid file format or extension error.
Before you start

Verify the original .xlsx attachment from the Outlook email opens correctly before it is processed by the flow, to rule out a corrupted source file.

Solution 1Recommended

Map the Correct Attachment Content Bytes in the Flow

Ensure that the actual binary content of the attachment is mapped to the 'Create file' action, rather than file metadata like the display name.

When a Power Automate flow copies an Outlook attachment to SharePoint, selecting the wrong dynamic content for the file body will corrupt the resulting file. The flow will report a successful run, but Excel will fail to open it due to the invalid format.

1
Edit the SharePoint action

Open your Power Automate flow, locate the 'Create file' or 'Update file' SharePoint action, and click to edit it.

2
Update the File Content field

Click into the 'File Content' field. From the Dynamic Content menu, select 'Attachment Content' (or 'Content Bytes') from the Outlook trigger, avoiding fields like 'Name' or 'Id'.

3
Verify the File Name

Ensure the 'File Name' field accurately reflects the source file name and dynamically includes the .xlsx extension.

4
Save and test

Save your flow and trigger a new test run. Navigate to your SharePoint folder and attempt to open the newly generated Excel file.

Map the Correct Attachment Content Bytes in the Flow
Troubleshooting Tip: Always compare the file size of the generated SharePoint file with the original Outlook attachment. A drastic difference usually confirms incorrect content mapping.
Free Microsoft Office alternative

Open and Edit Your Spreadsheets Seamlessly with WPS Office

Since Power Automate formatting issues require specific workflow configuration fixes, you might still need a reliable tool to handle your daily spreadsheet tasks locally. WPS Office is a highly compatible, free alternative that lets you open, edit, and save Excel files smoothly without heavy subscription costs.

  1. 1. Download WPS Office: Visit the official WPS website to download and install the free WPS Office suite.
  2. 2. Open Your Spreadsheet: Launch WPS Spreadsheet, click 'Open', and select your locally saved .xlsx file.
  3. 3. Edit and Save: Make your necessary edits and easily save the file in its original format.
Fully compatible with Microsoft Excel (.xlsx, .xls, and .csv) file formats.Lightweight installation with lightning-fast loading speeds for large datasets.Familiar ribbon interface ensures zero learning curve.Cross-platform support for Windows, Mac, Linux, iOS, and Android.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Automate report success but the Excel file is corrupt?

Power Automate reports a 'success' status when the workflow actions execute without technical errors. However, if the flow was configured to write text metadata instead of binary file content to the file, the creation action still succeeds, but the resulting file structure becomes an invalid format for Excel.

Can I use Power Automate to extract CSV attachments instead of XLSX?

Yes. Extracting CSV files follows a similar flow configuration. Since CSVs are plain text files, they are generally less prone to binary corruption issues compared to XLSX files, as long as the text encoding (like UTF-8) is handled properly.

How do I check if my Excel attachment is corrupted before the flow runs?

Go directly to your Outlook inbox, download the .xlsx attachment locally, and try opening it in an application like Excel or WPS Office. If the file opens successfully, the issue lies entirely within the Power Automate flow configuration, not the source file.