Collabora Office 21.06 Help
Defaults settings in Calc converts text inside cells to the respective numeric values if an unambiguous conversion is possible. If no conversion is possible, Calc returns a #VALUE! error.
Only integer numbers including exponent are converted, and ISO 8601 dates and times in their extended formats with separators. Anything else, like fractional numbers with decimal separators or dates other than ISO 8601, is not converted, as the text string would be locale dependent. Leading and trailing blanks are ignored.
您可以轉換下列 ISO 8601 格式:
CCYY-MM-DD
CCYY-MM-DDThh:mm
CCYY-MM-DDThh:mm:ss
CCYY-MM-DDThh:mm:ss,s
CCYY-MM-DDThh:mm:ss.s
hh:mm
hh:mm:ss
hh:mm:ss,s
hh:mm:ss.s
可省略世紀代碼 CC。僅會使用一個空格字元,而不是 T 日期與時間分隔符。
若指定日期,則必須是有效的西曆日期。在此情況下,選擇的時間必須在 00:00 至 23:59:59.99999... 的範圍內。
若僅指定時間字串,可能會有超過 24 的小時值,而分鐘和秒可有最大值 59。
The conversion is done for single scalar values only, not within ranges.
The conversion is done for single scalar values, as in =A1+A2, or ="1E2"+1. Cell range arguments are not affected, so SUM(A1:A2) differs from A1+A2 if at least one of the two cells contain a convertible string.
公式內的字串也會加以轉換,例如 ="1999-11-22"+42,此公式會傳回 1999 年 11 月 22 日後過 42 天的日期。若公式內的日期字串已本土化,則計算會傳回錯誤。例如,自動轉換無法使用已本土化的日期字串「11/22/1999」或「22.11.1999」。
In A1 enter the text '1e2 (which is converted to the number 100 internally).
In A2 enter =A1+1 (which correctly results in 101).
The formula =SUM(A1:A2), returns 101 instead of 201 because the conversion does not occur in a range, only for single scalar values. Here, '1e2 is treated as string which is ignored for the SUM function.
=SUM("1E2";1) returns #VALUE! because SUM() and some others that iterate over number sequences explicitly check the argument type.
The text to number conversion can be customized in the Detailed Calculation Settings option.