# SheetControl Class

> SheetControl class in the browser JavaScript API: Coordinates the editor lifecycle and delegates document and interaction behavior to focused operations.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Path:** TX Sheet Control > API Reference > JavaScript API > Browser Editor > SheetControl Class
- **772 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/llms-full.txt

---

Coordinates the editor lifecycle and delegates document and interaction behavior to focused operations.

Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

ES module import: `import { SheetControl } from '@txtextcontrol/tx-sheet-control';`.

### Constructor

```javascript
new SheetControl(host, options)
```

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `host` | `HTMLElement` | No | Value matching host's declared type and the owning object's validation rules. |
| `options` | `SpreadsheetOptions \| undefined` | Yes | Supported settings for this operation; omitted settings retain documented defaults. |

Returns: `SpreadsheetInstance`.

### Members

#### Properties

| Property | Description |
|---|---|
| [host](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/host-property/llms-full.txt) | The host value of SheetControl. |
| [licenseInfo](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/licenseinfo-property/llms-full.txt) | Immutable signed customer entitlement and current trial validity. |
| [ready](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/ready-property/llms-full.txt) | Resolves after discovery, font-picker initialization and initial document fonts; rejects on failure. |
| [ui](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/ui-property/llms-full.txt) | The ui value of SheetControl. |
| [userName](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/username-property/llms-full.txt) | Current comment author, shared with this control's workbook runtime. |
| [workbook](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/workbook-property/llms-full.txt) | The workbook value of SheetControl. |

#### Methods

| Method | Description |
|---|---|
| [destroy](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/destroy-method/llms-full.txt) | The destroy operation of SheetControl. |
| [load](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/load-method/llms-full.txt) | Loads XLSX/TXWB bytes or CSV/XML/JSON text/UTF-8 bytes atomically. Tabular formats replace the workbook with one worksheet. |
| [save](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/save-method/llms-full.txt) | Saves a snapshot with reusable format-specific options; PDF is save-only. |
| [saveText](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/savetext-method/llms-full.txt) | Saves CSV, XML or JSON text with flat settings. Omits a generated CSV BOM; UTF-8 byte limits/events still include it. Does not change the workbook or options. |

### Examples

Pass the SheetControl value obtained from its owning control, collection, callback or operation. The function reads that value without constructing a replacement document object.

```javascript
function inspectSheetControlUserName(sheetControl) {
    const value = sheetControl['userName'];
    console.log('SheetControl.userName', value);
}
```

### See Also

- [JavaScript Browser Editor API](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)

---

## In This Section

- [SheetControl.destroy Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/destroy-method/llms-full.txt): SheetControl.destroy method in the TX Sheet Control JavaScript API for the browser, with its syntax and a JavaScript example.
- [SheetControl.host Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/host-property/llms-full.txt): SheetControl.host property in the TX Sheet Control JavaScript API for the browser, with its type HTMLElement and a JavaScript example.
- [SheetControl.licenseInfo Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/licenseinfo-property/llms-full.txt): SheetControl.licenseInfo property in the TX Sheet Control JavaScript API for the browser: Immutable signed customer entitlement and current trial validity.
- [SheetControl.load Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/load-method/llms-full.txt): SheetControl.load method in the TX Sheet Control JavaScript API for the browser: Loads XLSX/TXWB bytes or CSV/XML/JSON text/UTF-8 bytes atomically.
- [SheetControl.ready Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/ready-property/llms-full.txt): SheetControl.ready property in the browser JavaScript API: Resolves after discovery, font-picker initialization and initial document fonts.
- [SheetControl.save Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/save-method/llms-full.txt): SheetControl.save method in the TX Sheet Control JavaScript API for the browser: Saves a snapshot with reusable format-specific options.
- [SheetControl.saveText Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/savetext-method/llms-full.txt): SheetControl.saveText method in the TX Sheet Control JavaScript API for the browser: Saves CSV, XML or JSON text with flat settings.
- [SheetControl.ui Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/ui-property/llms-full.txt): SheetControl.ui property in the TX Sheet Control JavaScript API for the browser, with its type EditorUi and a JavaScript example.
- [SheetControl.userName Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/username-property/llms-full.txt): SheetControl.userName property in the TX Sheet Control JavaScript API for the browser: Current comment author, shared with this control's workbook runtime.
- [SheetControl.workbook Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/workbook-property/llms-full.txt): SheetControl.workbook property in the TX Sheet Control JavaScript API for the browser, with its type Workbook and a JavaScript example.

---

## Nearby

- **Previous:** [SheetCollection.workbook Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcollection/workbook-property/llms-full.txt)
- **Next:** [SheetControl.destroy Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/sheetcontrol/destroy-method/llms-full.txt)
