Coding Geniuses
I am pulling images from power automate into excel using the following Script code:
function main(workbook: ExcelScript.Workbook, sheetName: string, address: string, base64ImageString: string) {
let sheet = workbook.getWorksheet(sheetName);
let range = sheet.getRange(address);
let OldDevSNimg = sheet.addImage(base64ImageString);
for (let i = 0; i < 3; i++) {
let nextcell = range.getOffsetRange(+1, 0);
OldDevSNimg.setTop(nextcell.getTop());
OldDevSNimg.setLeft(nextcell.getLeft());
OldDevSNimg.setWidth(300);
OldDevSNimg.setHeight(400);
OldDevSNimg.setLockAspectRatio(true);
OldDevSNimg.setPlacement;
OldDevSNimg.incrementTop(3);
OldDevSNimg.incrementLeft(5);
}
}
The Power Automate flow is sending a column with multiple images from a sharepoint list which need to be put on their respective rows... The issue I'm having is each image comes across and is placed on top of one another.
I am struggling with a for loop or some way to dynamically change to the next row (in the same column) for each image coming across from power automate.
Any help would be greatly appreciated! Apologies as I am new to TypeScript and just can't get the right syntax or expression.
Thanks in advance!