I need to get the NumberFormat from an excel file (appr. 3000 lines) and I wrote a simple Script which copy it from column A to column C each row by row. I tried to use this script with Power Automate after 10 minutes.
I already set the timeout on 60 minutes, but it seems that my tenant configuration abort it always after exactly 10 minutes.
Here is my script:
function main(workbook: ExcelScript.Workbook) {
let sheet = workbook.getWorksheets()[0]
let range = sheet.getUsedRange(true);
let rows = range.getUsedRange(true).getRowCount();
let cols = range.getUsedRange(true).getColumnCount();
for (let row = 2; row <= rows; row++) {
sheet.getRange("C" + row).setValue(sheet.getRange("A" + row).getNumberFormat())
}
}
Is there an easier way to copy the NumberFormat from one column to another and does anybody know a better way?