cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Neha2904
Helper II
Helper II

Create file (.xlsx,.mht) using file data saved as string

I have some files saved in database in filedata(base64) format.

e.g. 0x504B0304140006000....

 

I created a flow to convert the data to binary and then save the file. 

Neha2904_0-1646643162730.png

The file getting created is corrupt when I try to view it.

Neha2904_0-1646643423150.png

 

File Content:

{

  "$content-type""application/octet-stream",

  "$content""MHg1...

}

 

1 ACCEPTED SOLUTION

Accepted Solutions
fchopo
Super User
Super User

Hi,

Could you try to convert base64 to image with this online tool? Best Online Base64 to Image Decoder / Converter (codebeautify.org)

Just to know if the error is in the data or in the Power Automate flow.

Let us know.

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

2 REPLIES 2
fchopo
Super User
Super User

Hi,

Could you try to convert base64 to image with this online tool? Best Online Base64 to Image Decoder / Converter (codebeautify.org)

Just to know if the error is in the data or in the Power Automate flow.

Let us know.

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

Data in the database is a varbinary which I am converting to binary.

Neha2904_0-1646678527179.png

Edit: What I was previously doing was passing the filedata from PowerApps to cloud flow. I changed this to run the SQL query in Cloud flow and then pass the data with Base64ToBinary. And it worked 🙂

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,869)