web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get base64 string for ...
Power Automate
Unanswered

Get base64 string for images in excel

(0) ShareShare
ReportReport
Posted on by 1,115

I have an excel table downloaded from 3rd party website, the excel has 2 columns CompanyName (text) and Logo (Image). The requirement is to get base64 string of the images in this excel.

 

RameshMukka_0-1693244645207.png

 

 

Basically I need another column in the excel that would have base64 string of the corresponding logo. I would like to use these base64 strings in other systems to convert them  to images again. I have attempted to create a cloud flow to read the excel table, but flow not able to read the images at all. It looks like the image is in the cell, but it is not. It's just overlapping and resizing with the cell. That's why it's not showing up in the flow. Is it possible with Power Automate Desktop flow? I am pretty much new to PAD, please suggest guys.

 

Thanks a lot in advance.

I have the same question (0)
  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    In order to retrieve images from Excel, you will need to use scripting, such as VBscript, PowerShell or similar. No other nice way to do it. 

     

    Here's a sample VBscript code to do it:

    ' Get the folder path where you want to save the images from the Power Automate variable
    Path = "%ImagesPath%"
    
    ' Get the path to the Excel file from the Power Automate variable
    ExcelFilePath = "%FilePath%"
    
    ' Initialize the counter
    i = 1 
    
    ' Create a new instance of Excel
    Set Excel = CreateObject("Excel.Application")
    
    ' Open the workbook
    Set Workbook = Excel.Workbooks.Open(excelFilePath)
    
    ' Set the worksheet that contains the images
    Set Worksheet = Workbook.Sheets("Sheet1")
    
    'Loop through each picture in the worksheet
    For Each Picture In Worksheet.Pictures
     ' Set file name
     FileName = "Pic " & i & ".png"
     
     ' Save the picture as a .png file
     Picture.Select
     Picture.CopyPicture
     With Excel.Charts.Add
     .Paste
     .Export Path & FileName
     .Delete
     End With
    
     ' Increment the counter
     i = i + 1 
    Next
    
    'Close the workbook and the Excel app
    Workbook.Close
    Excel.Quit

     

    This will save all images in a folder you define, each of them named "Pic 1.png", "Pic 2.png", etc.

     

    You can then use Get files in folder to get those files and then loop through them, and then use Convert file to base64 to get the base64 string for each file. 

     

    You should then be able to do whatever you need with it - whether writing it to the same Excel sheet, or pushing it to this other app that you need it in.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • rameshmukka Profile Picture
    1,115 on at

    @Agnius Thank you for your effort for putting this for me. I am going to try this and come back with the results. Thanks a lot once again.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard