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 / import an image to exc...
Power Automate
Unanswered

import an image to excel by script through power automate and extract of a calculated cell

(0) ShareShare
ReportReport
Posted on by 2

Hi All 

 

Question 1:

I am trying to use the script to get an image from the HTTP request / base64 to an excel file.  However, what i do or any script i use I will get the following error in power to automate:

 

 

We were unable to run the script. Please try again.
Office JS error: Line 2: Worksheet addImage: The argument is invalid or missing or has an incorrect format.

 

 

 

This is what is used for the script lastly

 

 

function main(workbook: ExcelScript.Workbook, imageBase64: string) {
 let picture = workbook.getWorksheet("main").addImage(imageBase64);
 picture.setTop(30);
 picture.setLeft(30);
}

 

 

 

--------------------

 

Question 2:

How can I export only one calculated cell in excel to Automator "by calculated i mean A4+A54 for instance", I tried with the following script:

 

 

 

function main(workbook: ExcelScript.Workbook): string {
 let sheet = workbook.getWorksheet("main");
 let range = sheet.getRange("I43");
 return JSON.stringify(range.getValues());
}

 

 

 

and this is what I get in power automate as output:

 

 

 

#NAME?

 

 

 

Can anyone advise how to make the correct statement to import the image to excel ?

and How can I extract only one calculated cell?

 

Thanks in advance 🙂

Categories:
I have the same question (0)

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard