hi everyone,
In the desktop version you can use the autofill down option for the blanks rows but in the online Excel version this is not available.
Can anyone help me with an office script that auto fills column A and B, based on the values from the row above?
thanks in advance.
I found this code via internet, however i am get "0'' as result in the empty columns, can any one advise how the code should be populated?
function main(workbook: ExcelScript.Workbook) {
let ws: ExcelScript.Worksheet = workbook.getActiveWorksheet();
let tableName: string = "Table2";
let tableColumn: string = "Spec.";
let columnFormula: string = "=B";
let inputRange: ExcelScript.Range = workbook.getTable(tableName).getColumn(tableColumn).getRange();
let inputFormulas: string[][] = inputRange.getFormulas();
let newVals: string[][] = inputFormulas.map((cell, row) => {
if (cell.toString() === "") {
return [columnFormula + (row + 1)];
} else {
return [cell.toString()];
}
})
inputRange.setFormulas(newVals);
}

@GeoffRen