You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue was similar to #1041. The date/time is also stored as numeric in the spreadsheet, which format by date number format style, the cell type representing the cell's data type, which may not be the same as the data type by number format formatted. The type of numeric cell used by default in the spreadsheet, so you get the CellTypeUnset type. In another words, Both types CellTypeUnset and CellTypeNumber are numeric cells. According to the spreadsheet specification ISO/IEC 29500 5th §18.18.11, you only get CellTypeDate when a cell contains a date in the ISO 8601 format.
cellType, _ := file.GetCellType("Sheet1", "A1")
value, _ := file.GetCellValue("Sheet1", "A1")
fmt.Println(cellType)
fmt.Println(value)
expected console 1
2 //CellTypeDate
44854
expected console 2
5 //CellTypeString
2022/10/20
actual console
0 //CellTypeUnset
44854
I can't get any kind of desired results, How can I get the correct date data?
t.xlsx
The text was updated successfully, but these errors were encountered: