Skip to main content

Notifications

Community site session details

Community site session details

Session Id : NhTMeU1G2ueee50Xyswh5T
Power Automate - General Discussion
Unanswered

Excel sheet copy as picture script

Like (0) ShareShare
ReportReport
Posted on 24 Jan 2023 14:14:57 by

Hello Everyone,

 

In excel sheet we have a functionality of "Copy as picture" on selected cells.
I wanted integrate the same feature in automation by using some scripts.
I have an excel which has both text data and graphs kept on sheet1.
I tried below script below which will only get the text data and convert it to image. [The actual operation output from Microsoft excel application is providing a result image which contains both text and graphs].

 

 

 

function main(workbook: ExcelScript.Workbook) {
 var apdexWorkSheet = workbook.getWorksheet("sheet1");
 apdexWorkSheet.setVisibility(ExcelScript.SheetVisibility.visible);
 var tableImage = apdexWorkSheet.getRange("A1:I81").getImage();
 var imageData = 'data:image/png;base64,${tableImage}';
 return imageData;
}

 

 

 

could you please help me help me to automate it with right script.

Thanks and regards,
Suraj Jannu

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,771 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started
Loading complete