XL.Sheet.SetRightToLeft
-----------------------

Sets the right-to-left mode.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [XL](component_XL.md) | [7.2](newinversion72.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "XL.Sheet.SetRightToLeft"; BookRef; SheetIndex; rightToLeft ) 

**MBS**( **"XL.Sheet.SetRightToLeft";** /\* Sets the right-to-left mode. \*/  
**$BookRef**; /\* The reference number for the workbook.e.g. $ref \*/   
**$SheetIndex**; /\* The index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1.e.g. 0 \*/   
**$rightToLeft**) /\* The new value.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| BookRef | The reference number for the workbook. | $ref |
| SheetIndex | The index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1. | 0 |
| rightToLeft | The new value. | 1 |

### Result

Returns OK or error.

### Description

Sets the right-to-left mode.  
Pass 1 and the text is displayed in right-to-left mode, Pass 0 and the text is displayed in left-to-right mode.  
### See also

- [XL.Book.SheetCount](XLBookSheetCount.md)
- [XL.Sheet.RightToLeft](XLSheetRightToLeft.md)

This function checks for a license.

Created 22nd April 2017 , last changed 8th July 2024

  
[XL.Sheet.SetProtectEx](XLSheetSetProtectEx.md) - [XL.Sheet.SetRow](XLSheetSetRow.md)

[HTML Version](XLSheetSetRightToLeft.shtml)