# GC.Spread.Sheets.TextDirectionType

## Content

# Enumeration: TextDirectionType

[Spread](../modules/GC.Spread).[Sheets](../modules/GC.Spread.Sheets).TextDirectionType

Defines the type of the text direction.

**`example`**
```javascript
//This example uses the TextDirectionType enumeration.
activeSheet.getCell(0, 0).textDirection(GC.Spread.Sheets.TextDirectionType.rightToLeft);
activeSheet.getRange(1, -1, 1, -1).textDirection(GC.Spread.Sheets.TextDirectionType.rightToLeft);
var style = new GC.Spread.Sheets.Style();
style.textDirection = GC.Spread.Sheets.TextDirectionType.rightToLeft;
activeSheet.setStyle(1, 1, style, GC.Spread.Sheets.SheetArea.viewport);
```

## Table of contents

### Enumeration members

- [context](GC.Spread.Sheets.TextDirectionType#context)
- [leftToRight](GC.Spread.Sheets.TextDirectionType#lefttoright)
- [rightToLeft](GC.Spread.Sheets.TextDirectionType#righttoleft)

## Enumeration members

### <a id="context" name="context"></a> context

• **context** = `0`

Specifies the text direction is context dependent, which is determined by scanning the text for the first non-whitespace character: if it is a strong right-to-left character, the text direction is right-to-left; otherwise, the text direction is left-to-right.

___

### <a id="lefttoright" name="lefttoright"></a> leftToRight

• **leftToRight** = `1`

Specifies the text direction is left-to-right in the cell, as in English.

___

### <a id="righttoleft" name="righttoleft"></a> rightToLeft

• **rightToLeft** = `2`

Specifies the text direction is right-to-left in the cell, as in Arabic or Hebrew.
