Text Functions

This section contains descriptions of the Text functions.

Por atingi ĉi tiun komandon...

Enmeti - Funkcion - Kategorio Teksto


ANSTATAŬIGI

Anstataŭigas parton de teksto per alia teksto. Ĉi tiu funkcio estas uzebla por anstataŭigi kaj signojn kaj ciferojn (kiujn ĝi aŭtomate konvertas al teksto). La rezulto de la funkcio ĉiam vidiĝas kiel teksto. Se vi intencas fari pluajn kalkulojn al numero jam anstataŭigita de teksto, necesas rekonverti ĝin al numero per la funkcio VALORO.

Teksto kiu enhavas ciferojn devas esti en citiloj se vi ne deziras ke la funkcio interpretu ĝin kiel numeron kaj aŭtomate konverti ĝin al teksto.

Sintakso

REPLACE("Text"; Position; Length; "NewText")

Teksto estas la teksto, de kiu parto estas anstataŭigota.

Position refers to the position within the text where the replacement will begin.

Length is the number of characters in Text to be replaced.

NewText refers to the text which replaces Text.

Ekzemplo

=REPLACE("1234567";1;1;"444") returns "444234567". One character at position 1 is replaced by the complete NewText.

ANSTATAŬIGI

Anstataŭigas malnovan tekston en ĉeno per nova teksto.

Sintakso

SUBSTITUTE("Text"; "SearchText"; "NewText"; Occurrence)

Text is the text in which text segments are to be exchanged.

SearchText is the text segment that is to be replaced (a number of times).

NewText is the text that is to replace the text segment.

Occurrence (optional) indicates which occurrence of the search text is to be replaced. If this parameter is missing the search text is replaced throughout.

Ekzemplo

=SUBSTITUTE("123123123";"3";"abc") returns 12abc12abc12abc.

=SUBSTITUTE("123123123";"3";"abc";2) returns 12312abc123.

ARABA

Kalkulas la valoron de Romia nombro. La amplekso de la valoro devas esti inter 0 kaj 3999.

Sintakso

ARABIC("Text")

Teksto estas la teksto kiu reprezentas Romian nombron.

Ekzemplo

=IMABS("5+12j") liveras je 13.

=IMABS("5+12j") liveras je 13.

ASKI

The ASC function converts full-width to half-width ASCII and katakana characters. Returns a text string.

See https://wiki.documentfoundation.org/Calc/Features/JIS_and_ASC_functions for a conversion table.

Sintakso

ASC("Text")

Text is the text that contains characters to be converted.

See also JIS function.

BAHTTEKSTO

Konvertas numeron al taja teksto, inkluzive la tajajn valutonomojn.

Sintakso

BAHTTEXT(Number)

Number is any number. "Baht" is appended to the integral part of the number, and "Satang" is appended to the decimal part of the number.

Ekzemplo

=BAHTTEXT(12.65) returns a string in Thai characters with the meaning of "Twelve Baht and sixty five Satang".

BAZO

Konvertas pozitivan entjeron al specifita bazo al teksto el nombra sistemo. La ciferoj 0-9 kaj la literoj A-Z estas uzataj.

Sintakso

BASE(Number; Radix; [MinimumLength])

Numero estas la numero formatota.

Radix indicates the base of the number system. It may be any positive integer between 2 and 36.

MinimumLength (optional) determines the minimum length of the character sequence that has been created. If the text is shorter than the indicated minimum length, zeros are added to the left of the string.

Ekzemplo

=BAZ8AL16(144;4) liveras je 0064.

=BAZ8AL16(144;4) liveras je 0064.

=BAZ8AL16(144;4) liveras je 0064.

DEKSTRAJ

Liveras la lasta(j)n signon aŭ signojn de teksto.

Sintakso

RIGHT("Text"; Number)

Valoro estas la valoro, kies rango estas komputota.

Number (optional) is the number of characters from the right part of the text.

Ekzemplo

DEKSTRAJ("Suno";2) liveras je no.

DEKUMA

Converts text with characters from a number system to a positive integer in the base radix given. The radix must be in the range 2 to 36. Spaces and tabs are ignored. The Text field is not case-sensitive.

Se la bazo estas 16, ignoras antaŭirajn x aŭ X aŭ 0x aŭ 0X, kaj postgluitan h aŭ H. Se la bazo estas 2, ignoras postgluitan b aŭ B. Aliaj signoj, kiuj ne apartenas al la nombra sistemo, generas prieraran mesaĝon.

Sintakso

DECIMAL("Text"; Radix)

Text is the text to be converted. To differentiate between a hexadecimal number, such as A1 and the reference to cell A1, you must place the number in quotation marks, for example, "A1" or "FACE".

Radix indicates the base of the number system. It may be any positive integer between 2 and 36.

Ekzemplo

=IMREEL("1+3j") liveras je 1.

=IMREEL("1+3j") liveras je 1.

=IMREEL("1+3j") liveras je 1.

DOLARO

Converts a number to an amount in the currency format, rounded to a specified decimal place. In the Value field enter the number to be converted to currency. Optionally, you may enter the number of decimal places in the Decimals field. If no value is specified, all numbers in currency format will be displayed with two decimal places.

Vi agordas la valutan formaton en viaj sistemaj agordoj.

Sintakso

DOLLAR(Value; Decimals)

Value is a number, a reference to a cell containing a number, or a formula which returns a number.

Decimals is the optional number of decimal places.

Ekzemplo

=DOLARO(255) liveras $255,00.

=DOLLAR(367.456;2) returns $367.46. Use the decimal separator that corresponds to the current locale setting.

EKZAKTA

Komparas du ĉenojn kaj liveras je TRUE se ili estas identaj. Ĉi tiu funkcio estas usklodistinga.

Sintakso

EXACT("Text1"; "Text2")

Numero estas la numero formatota.

Numero estas la numero formatota.

Ekzemplo

=EXACT("microsystems";"Microsystems") returns FALSE.

FIKSITA

Liveras numeron kiel tekston kun specifita nombro da dekuma pozicioj kaj (malnepre) disigiloj de miloj.

Sintakso

FIXED(Number; Decimals; NoThousandsSeparators)

Numero estas la numero formatota.

Dekumoj estas la nombro da dekumaj pozicioj vidigotaj.

NoThousandsSeparators (optional) determines whether the thousands separator is used. If the parameter is a number not equal to 0, the thousands separator is suppressed. If the parameter is equal to 0 or if it is missing altogether, the thousands separators of your current locale setting are displayed.

Ekzemplo

=FIXED(1234567.89;3) returns 1,234,567.890 as a text string.

=FIXED(1234567.89;3;1) returns 1234567.890 as a text string.

JIS

The JIS function converts half-width to full-width ASCII and katakana characters. Returns a text string.

See https://wiki.documentfoundation.org/Calc/Features/JIS_and_ASC_functions for a conversion table.

Sintakso

JIS("Text")

Text is the text that contains characters to be converted.

See also ASC function.

KODO

Liveras numeran kodon por la unua signo en teksta ĉeno.

Sintakso

CODE("Text")

Teksto estas la teksto por kiu liveri la kodon de la unua signo.

Codes greater than 127 may depend on your system's character mapping (for example iso-8859-1, iso-8859-2, Windows-1252, Windows-1250), and hence may not be portable.

Ekzemplo

=CODE("Hieronymus") returns 72, =CODE("hieroglyphic") returns 104.

Note Icon

La kodo uzenda estas tiu de la koda tabelo aktuale ŝargita, ne al la ASKII-kodo.


KROĈI

Kunigas plurajn tekstajn ĉenojn en unu ĉenon.

Sintakso

CONCATENATE("Text1"; ...; "Text30")

Text 1; Text 2; ... represent up to 30 text passages which are to be combined into one string.

Ekzemplo

=CONCATENATE("Good ";"Morning ";"Mrs. ";"Doe") returns: Good Morning Mrs. Doe.

LEFTB

Liveras la unuajn signojn de DBCS-teksto.

Sintakso

LEFTB("Text"; Number_bytes)

Text is the text where the initial partial words are to be determined.

Number_bytes (optional) specifies the number of characters you want LEFTB to extract, based on bytes. If this parameter is not defined, one character is returned.

Ekzemploj

LEFTB("中国";1) returns " " (1 byte is only half a DBCS character and a space character is returned instead).

LEFTB("中国";2) returns "中" (2 bytes constitute one complete DBCS character).

LEFTB("中国";3) returns "中 " (3 bytes constitute one DBCS character and a half; the last character returned is therefore a space character).

LEFTB("中国";4) returns "中国" (4 bytes constitute two complete DBCS characters).

LEFTB("office";3) returns "off" (3 non-DBCS characters each consisting of 1 byte).

LENB

For double-byte character set (DBCS) languages, returns the number of bytes used to represent the characters in a text string.

Sintakso

LENB("Text")

Valoro estas la valoro, kies rango estas komputota.

Ekzemploj

LENB("中") returns 2 (1 DBCS character consisting of 2 bytes).

LENB("中国") returns 4 (2 DBCS characters each consisting of 2 bytes).

LENB("office") returns 6 (6 non-DBCS characters each consisting of 1 byte).

=LENB("Good Afternoon") returns 14.

=LENB(12345.67) returns 8.

LONGO

Liveras la longon de ĉeno, inkluzive spacetojn.

Sintakso

LEN("Text")

Valoro estas la valoro, kies rango estas komputota.

Ekzemplo

=IMREEL("1+3j") liveras je 1.

=IMREEL("1+3j") liveras je 1.

MAJUSKLIGI

Konvertas la ĉenon specifitan en la kampo teksto al majuskloj.

Sintakso

UPPER("Text")

Text refers to the lower case letters you want to convert to upper case.

Ekzemplo

=UPPER("Good Morning") returns GOOD MORNING.

MAJUSKLIGI.INICIALOJN

Majuskligas la unuan literon de ĉiu vorto en ĉeno.

Sintakso

PROPER("Text")

Numero estas la numero formatota.

Ekzemplo

=MAJUSKLIGI.INICIALOJN("libre office") liveras je Libre Office.

MALDEKSTRAJ

Liveras la unuan signon aŭ signojn de teksto.

Sintakso

LEFT("Text"; Number)

Text is the text where the initial partial words are to be determined.

numero (malnepra) specifas la nombron da signoj por la komenca teksto. Se tiu parametro ne estas difinita, liveras unu signon.

Ekzemplo

=BAZ8AL2(3;3) liveras je 011.

MEZO

Liveras ĉenon da teksto. La parametroj agordas la komencan pozicion kaj la nombron da signoj.

Sintakso

MID("Text"; Start; Number)

Text is the text containing the characters to extract.

Start is the position of the first character in the text to extract.

Number specifies the number of characters in the part of the text.

Ekzemplo

=IMABS("5+12j") liveras je 13.

MIDB

Liveras ĉenon de teksto de DBCS-teksto. La parametroj agordas la komencan pozicion kaj la nombron da signoj.

Sintakso

MIDB("Text"; Start; Number_bytes)

Text is the text containing the characters to extract.

Start is the position of the first character in the text to extract.

Number_bytes specifies the number of characters MIDB will return from text, in bytes.

Ekzemploj

MIDB("中国";1;0) returns "" (0 bytes is always an empty string).

MIDB("中国";1;1) returns " " (1 byte is only half a DBCS character and therefore the result is a space character).

MIDB("中国";1;2) returns "中" (2 bytes constitute one complete DBCS character).

MIDB("中国";1;3) returns "中 " (3 bytes constitute one and a half DBCS character; the last byte results in a space character).

MIDB("中国";1;4) returns "中国" (4 bytes constitute two complete DBCS characters).

MIDB("中国";2;1) returns " " (byte position 2 is not at the beginning of a character in a DBCS string; 1 space character is returned).

MIDB("中国";2;2) returns " " (byte position 2 points to the last half of the first character in the DBCS string; the 2 bytes asked for therefore constitutes the last half of the first character and the first half of the second character in the string; 2 space characters are therefore returned).

MIDB("中国";2;3) returns " 国" (byte position 2 is not at the beginning of a character in a DBCS string; a space character is returned for byte position 2).

MIDB("中国";3;1) returns " " (byte position 3 is at the beginning of a character in a DBCS string, but 1 byte is only half a DBCS character and a space character is therefore returned instead).

MIDB("中国";3;2) returns "国" (byte position 3 is at the beginning of a character in a DBCS string, and 2 bytes constitute one DBCS character).

MIDB("office";2;3) returns "ffi" (byte position 2 is at the beginning of a character in a non-DBCS string, and 3 bytes of a non-DBCS string constitute 3 characters).

MINUSKLIGI

Konvertas ĉiujn majusklojn en ĉeno al minuskloj.

Sintakso

LOWER("Text")

Numero estas la numero formatota.

Ekzemplo

=MINUSKLIGI("Suno") liveras je suno.

PURIGI

All non-printing characters are removed from the string.

Sintakso

CLEAN("Text")

Text refers to the text from which to remove all non-printable characters.

RIGHTB

Returns the last character or characters of a text with double bytes characters sets (DBCS).

Sintakso

RIGHTB("Text"; Number_bytes)

Text is the text of which the right part is to be determined.

Number_bytes (optional) specifies the number of characters you want RIGHTB to extract, based on bytes.

Ekzemploj

RIGHTB("中国";1) returns " " (1 byte is only half a DBCS character and a space character is returned instead).

RIGHTB("中国";2) returns "国" (2 bytes constitute one complete DBCS character).

RIGHTB("中国";3) returns " 国" (3 bytes constitute one half DBCS character and one whole DBCS character; a space is returned for the first half).

RIGHTB("中国";4) returns "中国" (4 bytes constitute two complete DBCS characters).

RIGHTB("office";3) returns "ice" (3 non-DBCS characters each consisting of 1 byte).

RIPETI

Ripetas ĉenon laŭ specifita nombro da fojoj.

Sintakso

REPT("Text"; Number)

Numero estas la numero formatota.

Numero estas la valoro de la funkcio.

La rezulto povas havi maksimume 255 signojn.

Ekzemplo

=REPT("Good morning";2) returns Good morningGood morning.

ROMA

Konvertas nombron al roma nombro. La valoro devas esti inter 0 kaj 3999, kaj la reĝimo devas esti entjero inter 0 kaj 4.

Sintakso

ROMA(nombro; reĝimo)

Nombro estas la nombro konvertota al roma nombro.

Reĝimo (malnepra) estas la grado de simpligo. Ju pli alta estas ĝia valoro, des pli simpla estas la roma nombro.

Ekzemplo

=ROMA(999) liveras je CMXCIX

=ROMA(999;0) liveras je CMXCIX

=KAJ(A;B) liveras je FALSA

=ROMA(999;2) liveras je XMIX

=ROMA(999;3) liveras je VMIV

=ROMA(999;4) liveras je IM

SERĈI

Returns the position of a string of text within another string.You can also define where to begin the search. The search term can be a number or any string of characters. The search is case-sensitive.

Sintakso

FIND("FindText"; "Text"; Position)

Numero estas la numero formatota.

Text is the text where the search takes place.

Position (optional) is the position in the text from which the search starts.

Ekzemplo

=FIND(76;998877665544) returns 6.

SERĈO

Liveras la pozicion de teksta segmento en ĉeno. Malnepre oni povas agordi la komencan punkton de la serĉo. La serĉota teksto povas esti numero aŭ signaro. La serĉo ne estas usklodistinga.

La serĉo subtenas regulajn esprimojn. Vi povas enigi "abc.*", ekzemple por serĉi la unuan lokon de "abc" sekvata de ajnaj signoj. Se vi volas serĉi tekston kiu ankaŭ estas regula esprimo, vi devas meti je \ antaŭ ĉiu signo. Vi povas baskuligi la aŭtomatan kalkulon de regula esprimo en - LibreOffice - Tabelilo - Kalkuli.

Sintakso

SEARCH("FindText"; "Text"; Position)

Numero estas la numero formatota.

Text is the text where the search will take place.

Position (optional) is the position in the text where the search is to start.

Ekzemplo

=SEARCH(54;998877665544) returns 10.

SIGNO

Konvertas nombron al signo laŭ la aktuala koda tabelo. La nombro povas esti ducifera aŭ tricifera.

Codes greater than 127 may depend on your system's character mapping (for example iso-8859-1, iso-8859-2, Windows-1252, Windows-1250), and hence may not be portable.

Sintakso

FI(Numero)

Number is a number between 1 and 255 representing the code value for the character.

Ekzemplo

=CHAR(100) returns the character d.

="abc" & CHAR(10) & "def" inserts a newline character into the string.

STUCI

Forigas spacetojn el ĉeno, lastante nur unu spaceton inter vortoj

Sintakso

TRIM("Text")

Text refers to text in which spaces are to be removed.

Ekzemplo

=TRIM(" hello world ") returns hello world without leading and trailing spaces and with single space between words.

T

Ĉi tiu funkcio liveras la celan tekston, aŭ malplenan ĉenon se la celo ne estas teksto.

Sintakso

T(Value)

If Value is a text string or refers to a text string, T returns that text string; otherwise it returns a blank text string.

Ekzemplo

=T(12345) returns an empty string.

=T("12345") returns the string 12345.

TEKSTO

Konvertas numeron al teksto laŭ donita formato.

Sintakso

TEKSTO(numero; formato)

Numero estas la numera valoro konvertota.

Formato estas la teksto kiu agordas la formaton. Uzu disigilojn decimalajn kaj de miloj laŭ la lingvo agordita en la ĉela formato.

Ekzemplo

=TEKSTO(12,34567;"###.##") liveras la tekston 12,35

=TEKSTO(12,34567;"000.00") liveras la tekston 012,35

UNICHAR

Converts a code number into a Unicode character or letter.

Sintakso

UNICHAR(number)

Ekzemplo

=UNICHAR(169) returns the Copyright character ©.

Tip Icon

See also the UNICODE() function.


UNICODE

Liveras numeran kodon por la unua unikoda signo en teksta ĉeno.

Sintakso

UNICODE("Text")

Ekzemplo

=UNICODE("©") returns the Unicode number 169 for the Copyright character.

Tip Icon

See also the UNICHAR() function.


VALORO

Konvertas ĉenon al numero.

Sintakso

DATOVALORO("Teksto")

Teksto estas la teksto kiu reprezentas Romian nombron.

Ekzemplo

=IMABS("5+12j") liveras je 13.