Spreadsheet Editor
The spreadsheet editor of TX Sheet Control runs in the browser, inside a page of your web application. Five short tutorials add it to a plain HTML page, a TypeScript module, an ASP.NET Core Razor Pages application an Angular application and a Blazor application, and each one fills a first worksheet with values and a SUM formula.
How the Editor Works
Every frontend creates the same editor, a Spreadsheet, in a host element of the page. Four things matter in each of them:
- Assets. The editor needs its script and its font and language files. Styles are bundled into the script and installed inside Shadow DOM. In plain JavaScript, TypeScript and Angular, you copy them into the static assets of your application and point the editor to the font catalog. In ASP.NET Core, the Tag Helper includes the scripts automatically, and the fonts come from the packaged static catalog.
- A host with a height. The host element needs a definite height: 720 pixels in the JavaScript tutorial, 640 in the others.
- Ready first. Your code waits until the editor is ready, then works with its workbook: it takes the first worksheet, writes values into a range and puts a formula into a cell.
- No server. The editor needs no server package.
Configure a signed license before creating the editor. Trial and Developer licenses display their corresponding editor watermark; OEM deployments have no licensing branding.
Choose a Frontend
| Frontend | Choose it when | How the editor is added | Package |
|---|---|---|---|
| JavaScript | Your page uses no framework, with script tags or with a bundler | new Spreadsheet() in a div element | @txtextcontrol/tx-sheet-control, or the standalone files of the browser folder |
| TypeScript | You write the page code in TypeScript and want the compiler to check options and types | new Spreadsheet() with typed SpreadsheetOptions | @txtextcontrol/tx-sheet-control |
| ASP.NET Core | You build an ASP.NET Core Razor Pages application on .NET 10 | The tx-sheet-control Tag Helper in a Razor page | TXTextControl.TXSheetControl.AspNetCore |
| Angular | Your application is written in Angular | TXSheetControlComponent, the tx-sheet-control element | @txtextcontrol/tx-sheet-control, imported from @txtextcontrol/tx-sheet-control/angular |
| Blazor | You need a Razor component with typed C# APIs and events in Server or WebAssembly | TXSheetControl component | TXTextControl.TXSheetControl.Blazor |
Where to Start
- Begin with JavaScript. It shows which files the editor needs and where they go, and the TypeScript tutorial refers to it for the assets.
- Continue with the tutorial of your frontend: TypeScript, ASP.NET Core or Angular.
For a Razor Pages application, you can also start with ASP.NET Core directly: the Tag Helper takes care of the assets.
Pages in This Section
JavaScript: copy the browser files, create the editor in an HTML page, fill a worksheet and use the npm package with a bundler.
TypeScript: create the editor with typed options, save the workbook as XLSX bytes and tell runtime exports from types.
ASP.NET Core: configure Razor Pages, register the Tag Helper, add the editor to a page and fill it from JavaScript.
Angular: add
TXSheetControlComponent, deploy its assets, give it a height and handle its outputs.Blazor: use the Razor component, store-issued licensing, typed workbook APIs, notifications and file streams.
Once the editor runs, the Spreadsheet Editor section describes its user interface, its keyboard support and its events.