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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (3,721)