
Announcements
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 🙂