I have a flow which triggers a excel office script .
A collection from power app initiates the flow .
Power app data : [{"Operations":"CNC_Programming","Score":"83%"},{"Operations":"CNC_Punching","Score":"89%"},{"Operations":"Bending","Score":"88%"},{"Operations":"Tapping_Operation","Score":"81%"},{"Operations":"Welding_Operation","Score":"79%"},{"Operations":"Grinding_Buffing_Operation","Score":"66%"},{"Operations":"Common_Points","Score":"81%"}]
I pass this data to excel , delete the existing item , paste it in that table .
Once script is triggered a chart is sent back to flow .
function main(workbook: ExcelScript.Workbook
) {
let selectedSheet = workbook.getWorksheet("Sheet1");
//get the current used range and lastRow
let myUsedRange = selectedSheet.getUsedRange();
let lastRow = myUsedRange.getAddress();
let radarchart = selectedSheet.addChart(ExcelScript.ChartType.radarFilled, selectedSheet.getRange(lastRow));
radarchart.getSeriesNameLevel[0]
let radarchartimage = radarchart.getImage();
radarchart.getTitle().setText('Score by Section');
radarchart.getAxes().getValueAxis().getFormat().getFont().setSize(1);
radarchart.getDataLabels().setShowValue(true);
radarchart.delete();
return [radarchartimage]
}
It works perfectly when excel file is kept opened but fails to paste the items on the table ( Only one row is getting pasted ) .
Kindly help in resolving this issue
