Text DOLLAR String Number Double Decimals Int The DOLLAR() function converts a number to text using currency format, with the decimals rounded to the specified place. Although the name is DOLLAR, this function will do the conversion according to the current locale. DOLLAR(number;decimals) DOLLAR(1403.77) returns "$ 1,403.77" DOLLAR(-0.123;4) returns "$-0.1230" FIXED String Number Double Decimals Int No_commas Bool The FIXED() function rounds a number to the specified number of decimals, formats the number in decimal format string, and returns the result as text. If decimals is negative, number is rounded to the left of the decimal point. If you omit decimals, it is assumed to be 2. If optional parameter no_commas is True, thousand separators will not show up. FIXED(number;decimals;no_commas) FIXED(1234.567;1) returns "1,234.6" FIXED(1234.567;1;FALSE) returns "1234.6" FIXED(44.332) returns "44.33" SUBSTITUTE String Text for which you want to substitute String Part of text you want to replace String New text which will be replacement String Occurrence of replacement Int The SUBSTITUTE() substitutes new_text for old_text in a text string. If instance_num is specified, only that instance of old_text is replaced. Otherwise, every occurrence of old_text is changed to new_text. Use SUBSTITUTE when you want to replace specific text, use REPLACE when you want to replace any text that occurs in a specific location. SUBSTITUTE(text; old_text; new_text; instance_num) SUBSTITUTE("Cost Data";"Cost";"Sales") returns "Sales Data" SUBSTITUTE("Qtr 1, 2001";"1";"3";1) returns "Qtr 3, 2001" SUBSTITUTE("Qtr 1, 2001";"1";"3";4) returns "Qtr 3, 2003" REPLACE FIND SEARCH Int The text you want to find String The text which may contain find_text String Specified index to start the search Int The SEARCH() function finds one text string (find_text) within another text string (within_text) and returns the number of the starting point of find_text, from the leftmost character of within_text. You can use wildcard characters, question mark (?) and asterisk (*). A question mark matches any single character, an asterisk matches any sequences of characters. Parameter start_num specifies the character at which to start the search. The first character is character number 1. If start_num is omitted, it is assumed to be 1. SEARCH does not distinguish between uppercase and lowercase letters. SEARCH(find_text;within_text;start_num) SEARCH("e";"Statements";6) returns 7 SEARCH("margin";"Profit Margin") returns 8 FIND T String Value Any The T() function returns the text referred to by value. If value is, or refers to, text then T returns value. If value does not refer to text then T returns empty text. T(value) T("KOffice") returns "KOffice" T(1.2) returns "" (empty text) TEXT String Value Any The TEXT() function converts a value to text. TEXT(value) TEXT(1234.56) returns "1234.56" TEXT("KSpread") returns "KSpread" PROPER String String String The PROPER() function converts the first letter of each word to uppercase and the rest of the letters to lowercase. PROPER(string) PROPER("this is a title") returns "This Is A Title" COMPARE Int First string String String to compare with String Compare case-sensitive (true/false) Boolean The COMPARE() function returns 0 if the two strings are equal; -1 if the first one is lower in value than the second one; otherwise it returns 1. COMPARE(string1; string2; true|false) COMPARE("KOffice"; "KOffice"; true) returns 0 COMPARE("koffice"; "KOffice"; true) returns 1 COMPARE("kspread"; "KOffice"; false) returns 1 EXACT EXACT Boolean String String String String The EXACT() function returns True if these two strings are equal. Otherwise, it returns False. EXACT(string1;string2) EXACT("KOffice";"KOffice") returns True EXACT("KSpread";"KOffice") returns False COMPARE REPLACE String Text which you want to replace some characters String Position of the characters to replace Int Number of characters to replace Int The text that will replace characters in old text String The REPLACE() function replaces part of a text string with a different text string. REPLACE(text;position;length;new_text) REPLACE("abcdefghijk";6;5;"-") returns "abcde-k" REPLACE("2002";3;2;"03") returns "2003" FIND MID FIND Int The text you want to find String The text which may contain find_text String Specifies index to start the search Int The FIND() function finds one text string (find_text) within another text string (within_text) and returns the number of the starting point of find_text, from the leftmost character of within_text. Parameter start_num specifies the character at which to start the search. The first character is character number 1. If start_num is omitted, it is assumed to be 1. You can also use function SEARCH, but unlike SEARCH, FIND is case-sensitive and does not allow wildcard characters. FIND(find_text;within_text;start_num) FIND("KOf";"KOffice") returns 1 FIND("i";"KOffice") returns 5 FIND("K";"KSpread in KOffice";4) returns 12 SEARCH REPLACE MID String Source string String Position Int Length Int The MID() function returns a substring that contains 'length' characters of the string, starting at 'position' index. MID(text;position;length) MID(text;position) MID("KOffice";2;3) returns "Off" MID("KOffice";2) returns "Office" LEFT RIGHT LEN Int String String The LEN() function returns the length of the string. LEN(text) LEN("hello") returns 5 LEN("KSpread") returns 7 TRIM String String String The TRIM() function returns text with only single spaces between words. TRIM(text) TRIM(" hello KSpread ") returns "hello KSpread" CONCATENATE String String values String String values String String values String String values String String values String The CONCATENATE() function returns a string which is the concatenation of the strings passed as parameters. CONCATENATE(value;value;...) CONCATENATE("KSpread";"KOffice";"KDE") returns "KSpreadKOfficeKDE" RIGHT String Source string String Amount of characters Int The RIGHT() function returns a substring that contains the 'length' rightmost characters of the string. The whole string is returned if 'length' exceeds the length of the string. RIGHT(text;length) RIGHT("hello";2) returns "lo" RIGHT("KSpread";10) returns "KSpread" RIGHT("KSpread") returns "d" LEFT MID LEFT String Source string String Amount of characters Int The LEFT() function returns a substring that contains the 'length' leftmost characters of the string. The whole string is returned if 'length' exceeds the length of the string. LEFT(text;length) LEFT("hello";2) returns "he" LEFT("KSpread";10) returns "KSpread" LEFT("KSpread") returns "K" RIGHT MID REPT String Source string String Count of repetitions Int The REPT() function repeats the first parameter as often as told by the second parameter. REPT(text;count) REPT("KSpread";3) returns "KSpreadKSpreadKSpread" ROT String Text String The ROT() function encrypts text by replacing each letter with the one 13 places along in the alphabet. If the 13th position is beyond the letter Z, it begins again at A (rotation). By applying the encryption function again to the resulting text, you can decrypt the text. ROT(Text) ROT("KSpread") returns "XFcernq" ROT("XFcernq") returns "KSpread" TOGGLE String Source string String The TOGGLE() function changes lowercase characters to uppercase and uppercase characters to lowercase. TOGGLE(text) TOGGLE("hello") returns "HELLO" TOGGLE("HELLO") returns "hello" TOGGLE("HeLlO") returns "hElLo" UPPER LOWER CLEAN String Source string String The CLEAN() function removes every non-printable character from the string CLEAN(text) CLEAN(AsciiToChar(7) + "HELLO") returns "HELLO" SLEEK String Source string String The SLEEK() function removes all spaces from the string. SLEEK(text) SLEEK("This is some text ") returns "Thisissometext" TRIM UPPER String Source string String The UPPER() function converts a string to upper case. UPPER(text) UPPER("hello") returns "HELLO" UPPER("HELLO") returns "HELLO" LOWER TOGGLE LOWER String Source string String The LOWER() function converts a string to lower case. LOWER(text) LOWER("hello") returns "hello" LOWER("HELLO") returns "hello" UPPER TOGGLE CHAR String Character code Int The CHAR() function returns the character specified by a number. CHAR(code) CHAR(65) returns "A" CODE CODE Int Text String The CODE() function returns a numeric code for the first character in a text string. CODE(text) CODE("KDE") returns 75 CHAR VALUE Double Text String Converts text string that represents a value to the real value. VALUE(text) VALUE("14.03") returns 14.03 REGEXP String Searched text String Regular expression String Default value (optional) String Back-reference (optional) Number Returns a part of the string that matches a regular expression. If the string does not match the given regular expression, value specified as default is returned. If a back-reference is provided, then the value of that back-reference is returned. If no default value is given, an empty string is assumed. If no back-reference is given, 0 is assumed (so that entire matching part is returned). REGEXP(text; regexp; default; backref) REGEXP("Number is 15.";"[0-9]+") = "15" REGEXP("15, 20, 26, 41";"([0-9]+), *[0-9]+$";"";1) = "26" REGEXPRE String Searched text String Regular expression String Replacement String Replaces all matches of a regular expression with the replacement text REGEXPRE(text; regexp; replacement) REGEXPRE("14 and 15 and 16";"[0-9]+";"num") returns "num and num and num"