Forum Discussion
Excel cannot be open the file 'filename.xlsx' because the file format or file extension is not valid
I encountered the same problem on a flow that HAD been working. Does this solve your problem?
Short version:
On Create File command, I was using “Current Item” in File Content field.
I changed that to use “Attachments Content” instead and now it works just fine.
Step 1: Initiate the workflow with “When a new email arrives….” Add whatever filtering conditions.
Step 2: Choose New Action, SharePoint, Create File.
Provide Site address, folder path, filename (with extension)
Step 3: for File Contents, choose “Attachment Content” from the Dynamic Content menu.
Do NOT choose “Current Item”.
When you choose “Attachments Content”, it will automatically transform Create File to be inside a loop and will look like this:
Once I made that change (use “Attachments Content” in File Content field) the Excel files I created opened correctly without error.
Credit to That Office Guy: https://youtu.be/gRLaCUFK2TY
He was saving to OneDrive seeing him use “Attachment Content” for File Content solved my problem.