បម្លែង​អត្ថបទ​ទៅជា​លេខ

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 ដូច​ខាង​ក្រោយ​ត្រូវ​បានបម្លែង ៖

កូដ​សតវត្ស CC មិនអាច​ត្រូវ​បានលុបទេ ។ ជំនួយមក​វិញ​សញ្ញា​បំបែក​ពេលវេលា និង​កាលបរិច្ឆេទ T ដោយ​ជាក់លាក់​តួអក្សរ​ចន្លោះ​មួយ​អាច​ត្រូវ​បានប្រើ ។

ប្រសិនបើ​កាលបរិច្ឆេទ​ត្រូវ​បានផ្ដល់ វា​ត្រូវ​តែ​មាន​កាលបរិច្ឆេទ​ប្រតិទិន Gregorian ត្រឹមត្រូវ ។ នៅ​ក្នុងករណី​នេះ ពេលវេលា​ជម្រើស​ត្រូវ​តែ​នៅ​ក្នុង​ជួរ 00:00 ដល់ 23:59:59.99999...

ប្រសិនបើ​ខ្សែអក្សរ​ពេលវេលា​ត្រូវ​បានផ្ដល់ វា​អាច​មាន​តម្លៃ​ម៉ោងជាង ២៤ ខណៈពេល​ដែល​នាទី និង​វិនាទី​អាច​មាន​តម្លៃ​អតិបរមា​ ៥៩ ។

note

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, ដែល​ត្រឡប់​កាលបរិច្ឆេទ ៤២ ថ្ងៃ​បន្ទាប់ពី​ថ្ងៃទី ២២ ខែ វិច្ឆិកា ឆ្នាំ ១៩៩៩ ។ ការ​គណនា​ពាក់ព័ន្ធនឹង​កាលបរិច្ឆេទ​ដែលបានធ្វើមូលដ្ឋានីយកម្ម ជា​ខ្សែអក្សរ​ខាង​ក្នុង​រូបមន្ត​ត្រឡប់កំហុស​មួយ ។ ឧទាហរណ៍ ខ្សែអក្សរ​កាលបរិច្ឆេទ​ដែល​បាន​ធ្វើមូលដ្ឋានីយកម្ម "11/22/1999" ឬ "22.11.1999" មិនអាច​ត្រូវ​បានប្រើ​សម្រាប់ការ​បម្លែង​ដោយ​ស្វ័យ​ប្រវត្តិ ។

warning

When using functions where one or more arguments are search criteria strings that represents a regular expression, the first attempt is to convert the string criteria to numbers. For example, ".0" will convert to 0.0 and so on. If successful, the match will not be a regular expression match but a numeric match. However, when switching to a locale where the decimal separator is not the dot makes the regular expression conversion work. To force the evaluation of the regular expression instead of a numeric expression, use some expression that can not be misread as numeric, such as ".[0]" or ".\0" or "(?i).0".


ឧទាហរណ៍

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.

Changing the default text to number conversion settings

The text to number conversion can be customized in the Detailed Calculation Settings option.

Please support us!