XL.Book.SetTemplate
-------------------

Sets the template flag.

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

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

**MBS**( **"XL.Book.SetTemplate";** /\* Sets the template flag. \*/  
**$BookRef**) /\* The reference number for the workbook.e.g. $ref \*/ 

### Parameters

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

### Result

Returns OK or error.

### Description

Sets the template flag.  
Pass 1 for workbook is template, 0 for workbook is not template (default). It allows to change type of file from a template file (xlt and xltx) to a regular file (xls and xlsx) and vice versa.  
### See also

- [XL.Book.IsTemplate](XLBookIsTemplate.md)

This function checks for a license.

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

  
[XL.Book.SetRefR1C1](XLBookSetRefR1C1.md) - [XL.Book.SheetCount](XLBookSheetCount.md)

[HTML Version](XLBookSetTemplate.shtml)