JavaScript API
JavaScript code works with TX Sheet Control through one of two APIs: the browser editor of the npm package @txtextcontrol/tx-sheet-control, or the Node.js server of @txtextcontrol/tx-sheet-control-server, which processes workbooks without a browser. Choose the API of the application you are writing. Each reference lists the classes, functions, constants and enumerations its package exports, with their signatures and an example.
The type names in a signature describe the values a member accepts. They do not mean that you install separate helper packages. The TypeScript API documents the same packages and additionally lists their interfaces and type aliases.
The Two APIs
| Browser Editor | Node.js Server | |
|---|---|---|
| Package | @txtextcontrol/tx-sheet-control | @txtextcontrol/tx-sheet-control-server |
| Start with | Spreadsheet, the editor in a host element | ServerSheetControl, a control without a DOM |
| The document | Workbook and Worksheet | Workbook and Worksheet |
| Exports | 35 classes, 12 functions, 9 constants and 1 enumeration | 32 classes, 1 function, 1 constant and 1 enumeration |
| Guide | JavaScript in Getting Started | Node.js in Getting Started |
Both packages export the same StreamType values for loading and saving, and both reach worksheets, ranges, tables and charts through the Workbook of their control. Workbook handles are obtained from their owner; the related object-model types listed in a reference are not an instruction to import extra packages.
Find the Right Page
| If you want to | Read |
|---|---|
| Create the editor in a page and work with its workbook | Browser Editor |
| Load, change and save workbooks in a Node.js service or console application | Node.js Server |
| Look up the shape of an options object or a type alias | TypeScript API |
Pages in This Section
- Browser Editor: the exports of
@txtextcontrol/tx-sheet-controlfor JavaScript. - Node.js Server: the exports of
@txtextcontrol/tx-sheet-control-serverfor JavaScript.