XL.Sheet.CellWriteError
-----------------------

Writes error into the cell with specified format.

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

MBS( "XL.Sheet.CellWriteError"; BookRef; SheetIndex; Row; Column; Value { ; Format } ) 

**MBS**( **"XL.Sheet.CellWriteError";** /\* Writes error into the cell with specified format. \*/  
**$BookRef**; /\* The reference number for the workbook.e.g. $ref \*/   
**$SheetIndex**; /\* The index of the sheet to delete. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1.e.g. 0 \*/   
**$Row**; /\* The row for the cell. First row has index 0. \*/   
**$Column**; /\* The column for the cell. First column has index 0. \*/   
**$Value**; /\* The new error number.e.g. 1 \*/   
**$Format**) /\* Optional; The format for the cell. This is index from 0 to XL.GetFormatCount-1 in the book's list of formats.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| BookRef | The reference number for the workbook. | $ref |  |
| SheetIndex | The index of the sheet to delete. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1. | 0 |  |
| Row | The row for the cell. First row has index 0. | $row |  |
| Column | The column for the cell. First column has index 0. | $column |  |
| Value | The new error number. | 1 |  |
| Format | The format for the cell. This is index from 0 to XL.GetFormatCount-1 in the book's list of formats. | 0 | Optional |

### Result

Returns OK or error.

### Description

Writes error into the cell with specified format.   
If format is empty then format is ignored.  
### See also

- [XL.Book.SheetCount](XLBookSheetCount.md)
- [XL.Sheet.CellWriteBlank](XLSheetCellWriteBlank.md)
- [XL.Sheet.CellWriteBlanks](XLSheetCellWriteBlanks.md)
- [XL.Sheet.CellWriteDate](XLSheetCellWriteDate.md)
- [XL.Sheet.CellWriteDates](XLSheetCellWriteDates.md)
- [XL.Sheet.CellWriteFormula](XLSheetCellWriteFormula.md)
- [XL.Sheet.CellWriteMatrix](XLSheetCellWriteMatrix.md)
- [XL.Sheet.CellWriteNumber](XLSheetCellWriteNumber.md)
- [XL.Sheet.CellWriteNumbers](XLSheetCellWriteNumbers.md)
- [XL.Sheet.CellWriteTexts](XLSheetCellWriteTexts.md)

This function checks for a license.

Created 22nd April 2017 , last changed 22nd April 2017

  
[XL.Sheet.CellWriteDates](XLSheetCellWriteDates.md) - [XL.Sheet.CellWriteFormula](XLSheetCellWriteFormula.md)

[HTML Version](XLSheetCellWriteError.shtml)