Showing results for 
Search instead for 
Did you mean: 
Helper IV
Helper IV

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





@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:


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.

Helper IV
Helper IV

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



 Thanks and regards,


Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,536)