cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Patron
Post Patron

Corrupted excel file created using flow when using create file in sharepoint

Corrupted excel file created using flow when using create file in sharepoint

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Corrupted excel file created using flow when using create file in sharepoint

Do you mind sharing the CreateFile screenshot again?

Can you also paste the FileContent here? Also make sure the Chucking is off on your Create File Action Settings.

 

This is how tested it and it works fine

create file.PNG

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,

Rahber

 

View solution in original post

8 REPLIES 8
Highlighted
Super User
Super User

Re: Corrupted excel file created using flow when using create file in sharepoint

This could depend on how you are creating the Excel File.

Would you mind sharing that?
Highlighted
Post Patron
Post Patron

Re: Corrupted excel file created using flow when using create file in sharepoint

@Rahber Please find below the flow

 

flowexcel.PNG

 

 

Highlighted
Super User
Super User

Re: Corrupted excel file created using flow when using create file in sharepoint

You have two problems in CreateFile action

1) File name should have proper extension i.e. I should be ExportedData12345.xlsx

2) File content cant be test, you need a proper valid file Content this is the reason your file is corrupted.

 

To solve it, do this. Create an empty Excel File in your share point and use the GetFileContent action and get the file content and pass this in your create file action every time to create an empty excel sheet.

file content.PNG

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,

Rahber

Highlighted
Post Patron
Post Patron

Re: Corrupted excel file created using flow when using create file in sharepoint

@Rahber 

I did as suggested. Still when i open the excel file in sharepoint it is corrupted.

Highlighted
Super User
Super User

Re: Corrupted excel file created using flow when using create file in sharepoint

Do you mind sharing the CreateFile screenshot again?

Can you also paste the FileContent here? Also make sure the Chucking is off on your Create File Action Settings.

 

This is how tested it and it works fine

create file.PNG

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,

Rahber

 

View solution in original post

Highlighted
Community Support
Community Support

Re: Corrupted excel file created using flow when using create file in sharepoint

Hi @cyberco01,

 

The reason for the Excel file corrupted is caused by the file extension and file content is not valid.

If you want to create Get rows from SQL, and append them into an Excel file, you could use Apply to each + add a row into a table action to append these data into an Excel file template, then copy the content of the template to create a new Excel file. Then empty all rows in the template for next use.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Post Patron
Post Patron

Re: Corrupted excel file created using flow when using create file in sharepoint

@v-litu-msft ,

can you please guide me with the steps in image so i can try it out.

it will be helpful for me.

Highlighted
Community Support
Community Support

Re: Corrupted excel file created using flow when using create file in sharepoint

Hi @cyberco01,

 

There are steps how to do it, and I use Get items of SharePoint connector, it just an example for explaining, you could put the output of SQL into the apply to each action:Annotation 2020-07-08 175049.jpg

 

Annotation 2020-07-08 175059.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,146)