Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get cell value which applied number format #1055

Closed
csg2008 opened this issue Nov 5, 2021 · 1 comment
Closed

Get cell value which applied number format #1055

csg2008 opened this issue Nov 5, 2021 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@csg2008
Copy link

csg2008 commented Nov 5, 2021

Description

1、将非日期的单元格格式设置为日期,在WPS Office与Onlyoffice中显示为原始内容,在excelize解析为日期内容就错了
2、复杂的数字格式解析错误,最后显示为部分格式字符串

Steps to reproduce the issue:

  1. 问题一重现过程:在A1单元格输入87812,将单元格格式设置为yyyy/m/d,解析结果为:06-01-40
  2. 问题二重现过程:在A2单元格输入 12930,将单元格格式设置为_([$USD] * #,##0.00_);([$USD] * (#,##0.00);([$USD] * "-"???);(@),解析结果为:( * -???_)

Describe the results you received:
解析结果与Office一样

Describe the results you expected:

Output of go version:

go version go1.17.2 windows/amd64

Excelize version or commit ID:

v2.4.1

Environment details (OS, Microsoft Excel™ version, physical, etc.):
WIN10, WPS Office 11.1.0.10938, Onlyoffice 6.4.1

@xuri
Copy link
Member

xuri commented Nov 5, 2021

This issue is duplicated with #660, as the documentation says, if the cell format can be applied to the value of a cell, the applied value will be returned, otherwise the original value will be returned.

@xuri xuri changed the title 基于单元格格式的解析错误 Get cell value which applied number format Nov 5, 2021
@xuri xuri added the duplicate This issue or pull request already exists label Nov 5, 2021
@xuri xuri closed this as completed Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants