XL.Book.SheetCount
------------------

Queries how many sheets are part of the workbook.

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

MBS( "XL.Book.SheetCount"; BookRef ) 

**MBS**( **"XL.Book.SheetCount";** /\* Queries how many sheets are part of the workbook. \*/  
**$BookRef**) /\* The reference number for the workbook.e.g. $ref \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| BookRef | The reference number for the workbook. | $ref |

### Result

Returns number of sheets.

### Description

Queries how many sheets are part of the workbook.  
### Examples

Query sheet count:

 Set Variable \[ $SheetCount ; Value: MBS ( "XL.Book.SheetCount"; $book ) \]  
### See also

- [XL.Book.FormatCount](XLBookFormatCount.md)
- [XL.Book.SheetName](XLBookSheetName.md)
- [XL.Table.RemoveFilter](XLTableRemoveFilter.md)
- [XL.Table.SetColumnName](XLTableSetColumnName.md)
- [XL.Table.SetName](XLTableSetName.md)
- [XL.Table.SetShowColumnStripes](XLTableSetShowColumnStripes.md)
- [XL.Table.SetShowFirstColumn](XLTableSetShowFirstColumn.md)
- [XL.Table.SetShowLastColumn](XLTableSetShowLastColumn.md)
- [XL.Table.SetShowRowStripes](XLTableSetShowRowStripes.md)
- [XL.Table.SetStyle](XLTableSetStyle.md)

### Example Databases

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

### Blog Entries

- [MBS FileMaker Plugin 16.1 News](https://www.mbsplugins.de/archive/2026-03-31/MBS_FileMaker_Plugin_161_News/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 19th April 2020

  
[XL.Book.SetTemplate](XLBookSetTemplate.md) - [XL.Book.SheetIndexForName](XLBookSheetIndexForName.md)

[HTML Version](XLBookSheetCount.shtml)