cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mahmoodhsaud
Helper III
Helper III

How to create xlsx file in onedrive using flow

Hi Everyone,

I tried creating an xlsx file using flow, the file is created but when opening it shows the file is corrupted.

Is there any other way to create an xlsx file using flow?

Thanks in advance

 

Regards,

Mahmood

2 REPLIES 2
kaitogoto
Microsoft
Microsoft

@mahmoodhsaud Hello Mahmood.

I hypothesize it is corrupted because you have created a file encoded by UTF-8. I suggest you try this:

1) Using the "Create File" action, set the file contents as a math function.

2) Define the math function as below:

concat(decodeUriComponent('%EF%BB%BF'),body('xlsxContents'))

If this method fails, it may require you to create it as a csv file and manually re-save the file as an xlsx.

A screenshot of the flow structure and the corrupted file will make it easier to narrow down the problem.

 

All the best!

Please accept this as a solution if solved to save time for everyone searching about the same problem, provide any copies of any error messages if not.

mahmoodhsaud
Helper III
Helper III

HI @kaitogoto, Thanks for your inputs.

The flow is to create a new excel sheet with dynamic file name. Every time a new project is created in powerapps the flow will be called to create a new excel sheet in which a newtable is created with columns and rows are updated from the flow.

I tried using the above function still its showing error

mahmoodhsaud_0-1624017969771.png

 

 Thanks and regards,

Mahmood

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,312)