Skip to content

Excel time always output in float format using StreamWriter #1107

@KuanYuLai

Description

@KuanYuLai

Description

I try to output excel time from time.Time variable using streamWriter, however, it seems like the value will always be in float format.

Steps to reproduce the issue:

  1. Create variable in time.Time type
  2. Write to excel using stream writer

Describe the results you received:
float format: 44090.5179861111

Describe the results you expected:
excel time format: 2021/12/29 19:26

Output of go version:

go version go1.17.5 darwin/arm64

Excelize version or commit ID:

excelize/v2 v2.4.2

Environment details (OS, Microsoft Excel™ version, physical, etc.):
OS: Mac with M1 chip
Microsoft Excel: Mac Version 16.12 (180410)

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