web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Excel file created by ...
Power Automate
Unanswered

Excel file created by flow cannot be opened invalid file format

(1) ShareShare
ReportReport
Posted on by 4
I've created a flow that is trigged when the user submits a new MS forms response.

The flow reads the uploaded file and then creates a new file with a subset of the submitted data.

The file is correctly created in a SharePoint location, but when I attempt to open the file, I get the below error:



Here is the flow I've created:
 
Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,479 Super User 2025 Season 2 on at
    Please provide more details on the "Create File" step.  Which payload did you specify?
     
    At a minimum you need
     
    {
      "$content-type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
      "$content": ""
    }
     
  • PL-20051401-0 Profile Picture
    4 on at
    @lbendlin - sorry, I'm not 100% sure what you mean by payload in this instance but here are some more details of the "Create File" step.


    For file contents I have simply added a blank space for now.

    The output from the step on a test run is:
     
    {
        "statusCode"200,
        "headers": {
            "Cache-Control""max-age=0, private",
            "Transfer-Encoding""chunked",
            "Vary""Origin,Accept-Encoding",
            "X-NetworkStatistics""0,4194690,0,7,83772,68121,68121,9060",
            "X-SharePointHealthScore""0",
            "X-MS-SPConnector""1",
            "X-SP-SERVERSTATE""ReadOnly=0",
            "DATASERVICEVERSION""3.0",
            "SPClientServiceRequestDuration""746",
            "IsOCDI""0",
            "X-DataBoundary""EU",
            "X-1DSCollectorUrl""https://eu-mobile.events.data.microsoft.com/OneCollector/1.0/",
            "X-AriaCollectorURL""https://eu-mobile.events.data.microsoft.com/Collector/3.0",
            "SPRequestGuid""50937f20-5d7c-4a4b-a656-a987f2675fca",
            "request-id""50937f20-5d7c-4a4b-a656-a987f2675fca",
            "MS-CV""oaAClxFAAMCmla48hwhBtQ.0",
            "SPLogId""9702a0a1-4011-c000-a695-ae3c870841b5",
            "Alt-Svc""h3=\":443\"",
            "Strict-Transport-Security""max-age=31536000",
            "X-Frame-Options""SAMEORIGIN",
            "Content-Security-Policy""frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com teams.cloud.microsoft *.office365.com goals.cloud.microsoft *.powerapps.com *.powerbi.com *.yammer.com engage.cloud.microsoft word.cloud.microsoft excel.cloud.microsoft powerpoint.cloud.microsoft *.officeapps.live.com *.office.com *.microsoft365.com m365.cloud.microsoft *.cloud.microsoft *.stream.azure-test.net *.dynamics.com *.microsoft.com onedrive.live.com *.onedrive.live.com securebroker.sharepointonline.com;",
            "MicrosoftSharePointTeamServices""16.0.0.26023",
            "X-Content-Type-Options""nosniff",
            "X-MS-InvokeApp""1; RequireReadOnly",
            "P3P""CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"",
            "X-AspNet-Version""4.0.30319",
            "X-Powered-By""ASP.NET",
            "x-ms-environment-id""default-287e9f0e-91ec-4cf0-b7a4-c63898072181",
            "x-ms-tenant-id""287e9f0e-91ec-4cf0-b7a4-c63898072181",
            "x-ms-dlp-re""-|-",
            "x-ms-dlp-gu""-|-",
            "x-ms-dlp-ef""-|-/-|-|-",
            "Timing-Allow-Origin""*",
            "x-ms-apihub-cached-response""false",
            "x-ms-apihub-obo""false",
            "Date""Tue, 20 May 2025 13:57:56 GMT",
            "Content-Type""application/json; charset=utf-8",
            "Expires""Mon, 05 May 2025 13:57:56 GMT",
            "Last-Modified""Tue, 20 May 2025 13:57:56 GMT",
            "Content-Length""634"
        },
        "body": {
            "ItemId"617,
            "Id""%252fShared%2bDocuments%252fGeneral%252f%252fMay.xlsx",
            "Name""May.xlsx",
            "DisplayName""May.xlsx",
            "Path""/Shared Documents/General/.../May.xlsx",
            "LastModified""2025-05-20T13:57:57Z",
            "Size"1,
            "MediaType""application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
            "IsFolder"false,
            "ETag""\"{A83EFA0F-1917-4BB3-9861-25A59A431FAA},3\"",
            "FileLocator""dataset=aHR0cHM6Ly9sc2Vncm91cC5zaGFyZXBvaW50LmNvbS90ZWFtcy9Db3JwVGVjaElUQk1pbnRlcm5hbA==,id=JTI1MmZTaGFyZWQlMmJEb2N1bWVudHMlMjUyZkdlbmVyYWwlMjUyZklUQk0lMmIlMjUyNiUyYlBNTyUyYkJyYWludHJ1c3QlMjUyZk1heS54bHN4"

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard