From the code
.
.
oCell = ThisComponent.CurrentController.ActiveSheet.GetCellByPosition(1, 0)
.
.
.
oCell.Value = DateSerial(2019, 1, 1)
For i = 2 To 365 ' Create a calendar
oCell = ThisComponent.CurrentController.ActiveSheet.GetCellByPosition(1, i-1)
oCell.Formula = "=B" & (i - 1) & "+1"
Next
Around first 50 cells are in DATE format and the rest are in LONG format.
I have to use PgDn on my keyboard to move up and down, then some more cells become in DATE format but not all cells.
If I click Save
menu icon, all cells refresh and display in DATE format.
Do I have to add any statement in the code ?
| LibreOffice 6.2.8.2-2 |