main program objective : skim through a column of dates and identify the row of current date
below code snippet objective: to print the cell value in date format
function main(workbook: ExcelScript.Workbook){
let sheet = workbook.getActiveworksheet("rainbow") // rainbow is the sheet name
let range = sheet.getRange("A1:A10) // taking only 10 dates for checking
let values=range.getValues();
for(let i=0; i<10; i++){
console.log(values[i][0])
}
}
The values of the column A are in the format:
when I expected the date to be printed as it is, the printed answers are
45495
45496
45497 etc
Can someone guide me where i am making mistake?
I tried searching in documentation but couldn;t find any function that can help me
Use range.getTexts()
not range.getValues()
, it will give you the value you see on screen, not the technical value behind the scenes.