XL.Sheet.GetPrintFit
--------------------

Returns whether fit to page option is enabled.

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

MBS( "XL.Sheet.GetPrintFit"; BookRef; SheetIndex; Selector ) 

**MBS**( **"XL.Sheet.GetPrintFit";** /\* Returns whether fit to page option is enabled. \*/  
**$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 \*/   
**$Selector**) /\* Which value to return. Can be Enabled, hPages or vPages.e.g. "Enabled" \*/ 

### 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 |
| Selector | Which value to return. Can be Enabled, hPages or vPages. | "Enabled" |

### Result

Returns value or error.

### Description

Returns whether fit to page option is enabled.   
wPages: number of pages the sheet width is fit to;  
hPages: number of pages the sheet height is fit to.  
Enabled: 1 if enabled or 0 if disabled.  
### See also

- [XL.Book.SheetCount](XLBookSheetCount.md)
- [XL.Sheet.GetPicture](XLSheetGetPicture.md)
- [XL.Sheet.GetPrintRow](XLSheetGetPrintRow.md)
- [XL.Sheet.GetPrintZoom](XLSheetGetPrintZoom.md)
- [XL.Sheet.GetProtect](XLSheetGetProtect.md)
- [XL.Sheet.SetPrintArea](XLSheetSetPrintArea.md)
- [XL.Sheet.SetPrintFit](XLSheetSetPrintFit.md)
- [XL.Sheet.SetPrintRow](XLSheetSetPrintRow.md)
- [XL.Sheet.SetPrintZoom](XLSheetSetPrintZoom.md)
- [XL.Sheet.SetProtect](XLSheetSetProtect.md)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[XL.Sheet.GetPrintArea](XLSheetGetPrintArea.md) - [XL.Sheet.GetPrintGridlines](XLSheetGetPrintGridlines.md)

[HTML Version](XLSheetGetPrintFit.shtml)