Hello all
im doing my first office script:
function main(workbook: ExcelScript.Workbook) {
let selectedSheet = workbook.getActiveWorksheet();
// Set range Y1:Y2 on selectedSheet
selectedSheet.getRange("Y1:Y2")
.setValues([
["Date"],
["=TEXT(TODAY(),'mm.dd.yyyy')"]
]);
// Set width of column(s) Y1 to 73.5
selectedSheet.getRange("Y1")
.getFormat()
.setColumnWidth(73.5);
// Auto fill range
selectedSheet.getRange("Y2")
.autoFill("Y2:Y52", ExcelScript.AutoFillType.fillDefault);
}
and i need 2 things:
1. the formula to fill a cell with date fails....im pretty sure that is a problem with quotes
2. i need how to calculate last row to apply the auto fill
regards