XL.Sheet.GetFirstRow
--------------------

Returns the first row in the sheet that contains a used cell.

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

MBS( "XL.Sheet.GetFirstRow"; BookRef; SheetIndex ) 

**MBS**( **"XL.Sheet.GetFirstRow";** /\* Returns the first row in the sheet that contains a used cell. \*/  
**$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 \*/ 

### 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 |

### Result

Returns value.

### Description

Returns the first row in the sheet that contains a used cell.  
See also [XL.Sheet.GetFirstFilledRow](XLSheetGetFirstFilledRow.md)  
### See also

- [XL.Book.SheetCount](XLBookSheetCount.md)
- [XL.Sheet.GetFirstCol](XLSheetGetFirstCol.md)
- [XL.Sheet.GetFirstFilledRow](XLSheetGetFirstFilledRow.md)
- [XL.Sheet.GetLastCol](XLSheetGetLastCol.md)
- [XL.Sheet.GetLastRow](XLSheetGetLastRow.md)
- [XL.Sheet.GetPrintRow](XLSheetGetPrintRow.md)
- [XL.Sheet.ReadCellsAsMatrix](XLSheetReadCellsAsMatrix.md)
- [XL.Sheet.SetPrintRow](XLSheetSetPrintRow.md)

### Example Databases

- [XL/XL Test](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/XL/XL%20Test.shtml#4ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 26th May 2020

  
[XL.Sheet.GetFirstFilledRow](XLSheetGetFirstFilledRow.md) - [XL.Sheet.GetFooter](XLSheetGetFooter.md)

[HTML Version](XLSheetGetFirstRow.shtml)