# LEFTB

Spread for WinForms provides advanced software components that support Excel import/export, full cell customization, an extensive calculation engine with over 450 functions and more, all with zero dependencies on Excel.

## Content



This function returns the specified leftmost characters from a text value on the basis of the number of bytes in the specified value.

## Syntax

LEFTB(*mytext*, *num\_bytes*)

## Arguments

This function has the following arguments:

| **Argument** | **Description** |
| -------- | ----------- |
| *mytext* | Refers to the text string that contains the characters you want to extract. |
| *num\_bytes* | [Optional] Refers to the number of bytes to extract. If this value is not given, it uses one. If this value is not an integer, the number is truncated. |

## Remarks

The *mytext* argument can be a string, a formula that returns a string, or a reference to a cell containing a string.
The *num\_bytes* argument has the following rules:

* It must be greater than or equal to zero.
* If it is greater than the length of text, this function returns all the text.

## Data Types

Accepts string data for the first argument and numeric data the second argument. Returns string data.

## Examples

`LEFTB("rheabuto",4)` gives the result rhea.
`LEFTB("rheabuto")` gives the result r.

## Version Available

This function is available in Spread for Windows Forms 11.0 or later.