Excel Office Script - Getting an Image of a Power Pivot incl. Conditional formatting to send email

Occasional Visitor

I'm trying to use the combination of Excel Office Script and Power Automate to send email with an image of Pivot Table.

Below is the code I came up with in Excel Script, but the resulting image that gets sent doesn't include the conditional formatting, only the data and the standard formatting get sent.

Any ideas? Thanks!




function main(workbook: ExcelScript.Workbook): BudImg {
   let tableImg = workbook.getWorksheet("Overview").getPivotTable("PivotTable3").getLayout().getRange().getImage();
   return {tableImg};

interface BudImg {
	tableImg: string



0 Replies