Ενεργοποιήστε τη JavaScript στον περιηγητή για να εμφανίσετε τις σελίδες βοήθειας LibreOfficeDev.
Συναρτήσεις κειμένου
Αυτή η ενότητα περιγράφει τις συναρτήσεις Κειμένου.
Εισαγωγή - Συνάρτηση - Κατηγορία Κείμενο
Χρήση διπλών εισαγωγικών σε τύπους
Για να συμπεριλάβετε μια συμβολοσειρά κειμένου σε έναν τύπο, τοποθετήστε τη συμβολοσειρά κειμένου μεταξύ δύο διπλών εισαγωγικών (") και ο Calc παίρνει τους χαρακτήρες της συμβολοσειράς χωρίς να προσπαθήσει να τους ερμηνεύσετε. Για παράδειγμα, ο τύπος ="Γεια σου κόσμε!" εμφανίζει τη συμβολοσειρά κειμένου Γεια σου κόσμε! στο κελί, χωρίς περιττά διπλά εισαγωγικά.
Ο πιο περίπλοκος τύπος =CONCATENATE ("Η ζωή είναι πραγματικά απλή,", "αλλά εμείς επιμένουμε να την κάνουμε περίπλοκη". "(Κομφούκιος).") συνδέει τρεις μεμονωμένες συμβολοσειρές σε διπλά εισαγωγικά, εξάγοντας Η ζωή είναι πραγματικά απλή, αλλά επιμένουμε να την κάνουμε περίπλοκη (Κομφούκιος).
Για να τοποθετήσετε ένα κυριολεκτικό διπλό εισαγωγικό μέσα σε μια συμβολοσειρά σε έναν τύπο, μπορούν να χρησιμοποιηθούν δύο μέθοδοι:
-
Μπορείτε να "διαφύγετε" από το διπλό εισαγωγικό με ένα επιπλέον διπλό εισαγωγικό και ο Calc αντιμετωπίζει το διπλό εισαγωγικό που διέφυγε ως κυριολεκτική τιμή. Για παράδειγμα, ο τύπος ="Το όνομά μου είναι" "John Doe" "." εξάγει τη συμβολοσειρά Το όνομά μου είναι "John Doe". Ένα άλλο απλό παράδειγμα είναι ο τύπος =UNICODE ("" "") που επιστρέφει 34 , την δεκαδική τιμή του χαρακτήρα εισαγωγικού Unicode (U+0022) - εδώ το πρώτο και το τέταρτο διπλό εισαγωγικό υποδεικνύουν το αρχή και τέλος της συμβολοσειράς, ενώ το δεύτερο διπλό εισαγωγικό διαφεύγει από το τρίτο.
-
Μπορείτε να χρησιμοποιήσετε τη συνάρτηση CHAR ή τη συνάρτηση UNICHAR για να εισαγάγετε ένα διπλό εισαγωγικό. Για παράδειγμα, ο τύπος =UNICHAR (34) & "The Catcher in the Rye" & UNICHAR (34) & "είναι ένα διάσημο βιβλίο του JD Salinger." εμφανίζει τη συμβολοσειρά "The Catcher in the Rye" είναι ένα διάσημο βιβλίο του JD Salinger.
Λάβετε υπόψη ότι η λειτουργία Αυτόματης Διόρθωσης του Calc ενδέχεται να τροποποιήσει τα διπλά εισαγωγικά. Η Αυτόματη Διόρθωση δεν πρέπει να αλλάξει τα διπλά εισαγωγικά στα κελιά τύπου, αλλά μπορεί να αλλάξει αυτά που χρησιμοποιούνται σε κελιά που δεν περιέχουν κείμενο. Για παράδειγμα, εάν αντιγράψετε μια συμβολοσειρά που περιβάλλεται από κάποια άλλη μορφή τυπογραφικών διπλών εισαγωγικών, όπως το αριστερό διπλό εισαγωγικό (U+201C) και το δεξιό διπλό εισαγωγικό (U+201D), και στη συνέχεια επικολλήσετε σε κελί τύπου, ενδέχεται να προκύψει σφάλμα. Ανοίξτε την περιοχή Διπλά εισαγωγικά του διαλόγου για να ορίσετε τους χαρακτήρες που χρησιμοποιούνται για την αυτόματη διόρθωση των τυπογραφικών διπλών εισαγωγικών έναρξης και λήξης. Αποεπιλέξτε το πλήκτρο εναλλαγής για να απενεργοποιήσετε τη δυνατότητα.
Empty string and blank cells
Cells with the empty string ("") are not equivalent to blank cells. When searching or calculating with text, the empty string "" is the text with length zero.
For example, when the formula in A1 returns the empty string "", the following applies:
=ISBLANK(A1) returns FALSE. The cell is not blank.
=ISFORMULA(A1) returns TRUE. The cell is a formula.
=ISLOGICAL(A1) returns FALSE. Not a logical value.
=ISNONTEXT(A1) returns FALSE. The cell has the empty string.
=ISNUMBER(A1) returns FALSE. Not a number.
=ISTEXT(A1) returns TRUE. The cell has the empty string, calculated by a formula.
=LEN(A1) returns 0. The length of the empty string is 0.
Επιστρέφει την αριθμητική τιμή που αντιστοιχεί σε έναν ρωμαϊκό αριθμό που εκφράζεται ως κείμενο.
Μετατρέπει χαρακτήρες διπλού byte (πλήρους πλάτους) σε χαρακτήρες ASCII ενός byte (μισού πλάτους) και χαρακτήρες κατακάνα.
Converts a number to Thai text, including the Thai currency names.
Converts a positive integer to a specified base into a text from the numbering system. The digits 0-9 and the letters A-Z are used.
Converts a number into a character according to the current code table. The number can be a two-digit or three-digit integer number.
All non-printing characters are removed from the string.
Returns a numeric code for the first character in a text string.
Combines several text strings into one string.
Converts text that represents a number in a numeral system with the given base radix to a positive integer. The radix must be in the range 2 to 36. Spaces and tabs are ignored. The Text field is not case-sensitive.
Converts a number to a string representing the amount in the currency format, rounded to a specified decimal places, using the decimal separator that corresponds to the current locale setting. In the Value field enter the number to be converted. 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.
Compares two text strings and returns TRUE if they are identical. This function is case-sensitive.
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.
Returns a number as text with a specified number of decimal places and optional thousands separators.
Μετατρέπει χαρακτήρες ASCII ενός byte (μισού πλάτους) ή χαρακτήρες κατακάνα σε χαρακτήρες διπλού byte (πλήρους πλάτους).
Returns the first character or characters of a text.
Returns the first characters of a DBCS text.
Returns the length of a string including spaces.
For double-byte character set (DBCS) languages, returns the number of bytes used to represent the characters in a text string.
Converts all uppercase letters in a text string to lowercase.
Returns a text string of a text. The parameters specify the starting position and the number of characters.
Returns a text string of a DBCS text. The parameters specify the starting position and the number of characters.
Capitalizes the first letter in all words of a text string.
Ταιριάζει και εξάγει ή προαιρετικά αντικαθιστά κείμενο χρησιμοποιώντας κανονικές εκφράσεις.
Replaces part of a text string with a different text string. This function can be used to replace both characters and numbers (which are automatically converted to text). The result of the function is always displayed as text. If you intend to perform further calculations with a number which has been replaced by text, you will need to convert it back to a number using the VALUE function.
Repeats a character string by the given number of copies.
Returns the last character or characters of a text.
Returns the last character or characters of a text with double bytes characters sets (DBCS).
Μετατρέπει έναν αριθμό σε λατινικό αριθμό. Το εύρος τιμών πρέπει να είναι μεταξύ 0 και 3999. Μια λειτουργία απλοποίησης μπορεί να καθοριστεί στην περιοχή από 0 έως 4.
Returns the position of a text segment within a character string. You can set the start of the search as an option. The search text can be a number or any sequence of characters. The search is not case-sensitive. If the text is not found, returns error 519 (#VALUE).
Substitutes new text for old text in a string.
This function returns the target text, or a blank text string if the target is not text.
Converts a value into text according to a given format.
Removes spaces from a string, leaving only a single space character between words.
Converts a code number into a Unicode character or letter.
Returns the numeric code for the first Unicode character in a text string.
Converts the string specified in the text field to uppercase.
Μετατρέπει την αναπαράσταση συμβολοσειράς ενός αριθμού σε αριθμητική μορφή. Εάν η παρεχόμενη συμβολοσειρά είναι έγκυρη ημερομηνία, χρόνος ή ημερομηνία-χρόνος, επιστρέφεται ο αντίστοιχος σειριακός αριθμός ημερομηνίας-χρόνου.
Λήψη κάποιου περιεχομένου ιστού από ένα URI.
Εφαρμόζει μια έκφραση XPath σε ένα έγγραφο XML.
Επιστρέφει κωδικοποιημένη συμβολοσειρά URL.