[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
LEFTB ( string [ , number-bytes ] )
Description: Extracts the left-most number-bytes-worth of characters from string. (LEFTB is intended for use with languages that use the double-byte character set (DBCS), whereas LEFT (§3.17.7.190) is intended for use with languages that use the single-byte character set (SBCS).)
Arguments:
Name |
Type |
Description |
string |
Designate the string from which a substring is to be extracted. | |
number-bytes |
number |
The number of bytes to be extracted. If omitted, a count of 1 shall be assumed. number-bytes shall be at least 0. If number-bytes exceeds the length of string, the whole of string shall be extracted. |
Return Type and Value: text – A string containing the left-most number-bytes-worth of characters from string.
However, if number-bytes is negative, #VALUE! is returned.
[Example: Assuming 1-byte characters:
LEFTB("abcdef",2) results in ab
LEFTB(A10,4) results in xyz1, when A10 contains xyz123
end example]