dream-num / univer

Univer is an open-source productivity tool dev kit helping you integrate spreadsheets, docs and slides into your applications.
https://univer.ai
Apache License 2.0
6.89k stars 597 forks source link

[Bug] 单元格文本格式或者常规格式输入0开头0都会被省略掉 #3675

Open 335060087 opened 1 week ago

335060087 commented 1 week ago

在您提交此问题之前,您是否检查了以下内容?

受影响的包和版本

0.3.0

复现链接

官网链接即可复现

预期行为

文本:01--->01

实际行为

文本:01--->1

运行环境

Chrome

系统信息

No response

jikkai commented 1 week ago

Please confirm that your cell type is set to CellValueType.FORCE_STRING. If you still cannot input a string of numbers starting with 0 when the cell type is set to CellValueType.FORCE_STRING, you should provide the minimal reproduction.

liuniuxs commented 1 week ago

如果设置了强文本类型,但是我的数据中包含字符串,025,011这种数据,会强制弹出提示“以文本形式存储的数字”,实际中数据可能会有abcd,汉字,025等形式; 而且如果单元格初始化时包含公式,即使设置了强文本类型也会失效。 Image_20241012094509 Image_20241012094539

univer-bot[bot] commented 1 week ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

If the strong text type is set, but my data contains strings such as 025,011, the prompt "Numbers stored in text form" will be forced to pop up. In fact, the data may be in the form of abcd, Chinese characters, 025, etc.; And if the cell initialization contains a formula, even if the strong text type is set, it will fail. Image_20241012094509 Image_20241012094539