Skip to content

Get Date Cell Value #1133

@AngangGuo

Description

@AngangGuo

I formatted the date cell 1/5/2022 as 1/5. When the cursor moved to the E1 cell, I can see the actual value is 1/5/2022 in the formula bar as shown in the following picture.

image

When I read the cell value using Excelize, it shows 1/5.

s, _ := f.GetCellValue("Sheet1", "E1")
// print 1/5 instead of 1/5/2022
fmt.Println(s)

How can I read it as date 1/5/2022?
or as a number as in #1112 ?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions