TX Sheet Control

.NET Server Applications

Topic

The .NET Server package, TXTextControl.TXSheetControl.Server, processes workbooks without a browser. Its engine runs in V8, through Microsoft ClearScript, inside your .NET process. The package needs no Node.js installation, no browser and no network connection, but its publish output contains more than your assembly: the engine and its fonts, and the native V8 libraries. Deploy the complete output; publishing for a single platform makes it smaller.

What the Publish Output Contains

dotnet publish -c Release -o publish
File or folderContents
TXTextControl.TXSheetControl.*.dllThe .NET API: Server, Api, Data and Data.Http
tx-sheet-engine/The engine embedded.js, the fonts folder and the third-party licenses of V8 and ClearScript
ClearScript.*.dll, Sodium.Core.dll, Newtonsoft.Json.dllThe dependencies from nuget.org
runtimes/The native V8 and libsodium libraries for each platform

Deploy the complete folder. The package finds tx-sheet-engine next to the application assembly, so the application can run from any working directory. Do not serve tx-sheet-engine as web content: it is a private resource of the application.

Without the folder, the first control fails with DirectoryNotFoundException: Could not find a part of the path '…/tx-sheet-engine/embedded.js'.

Publish for One Platform

A portable publish contains the native libraries of every platform and takes about 324 MB. Publish for the platform you deploy to, and the output keeps only its libraries, about 130 MB for Linux on x64:

dotnet publish -c Release -r linux-x64 --self-contained false -o publish

The native V8 libraries exist for six platforms: win-x64, win-arm64, linux-x64, linux-arm64, osx-x64 and osx-arm64. The target needs the .NET 10 runtime, or publish with --self-contained true to include it.

Fonts

The package uses the fonts in tx-sheet-engine/fonts: the 30 supplied families. To add fonts, copy that folder, add your files and set ServerSheetControlOptions.FontDirectory or the environment variable TX_SHEET_FONT_DIRECTORY to the copy, as Custom Fonts shows. Fonts installed on the server are not used.

Cancellation and Limits

  • Cancellation. LoadAsync, SaveAsync and the other asynchronous methods accept a CancellationToken. Pass the token of the request, so that an aborted request also stops its processing.
  • Document size. ServerSheetControlOptions.MaxRows and MaxColumns limit the size of the worksheets of a control. Writing a cell beyond the limit, or loading a file with such a cell, fails with "Cell is outside this worksheet." Use the limits to reject oversized uploads.
  • Request limits. The upload size, timeouts and the number of concurrent requests belong to the host application, such as the request limits of ASP.NET Core.

Plan Hosting and Capacity

  • Permissions. The application needs read access to its own folder, including tx-sheet-engine, and write access only where it stores its output.
  • Concurrency. Each ServerSheetControl holds a workbook and its processing state in memory. Limit the number of controls that run at the same time, based on measured document sizes and memory, as Lifetime and Concurrency describes.
  • License. A Developer license covers two production server instances; every running instance counts, also behind a load balancer. More instances require the OEM license, as Licensing describes.

Verify the Published Application

Run the application from the publish folder on the target, with the license it uses in production, and:

  1. Load a sample XLSX file.
  2. Change values and calculate a formula.
  3. Save a PDF with several pages, and check its fonts.

These steps test the engine, the fonts and the license, not only that the application starts.

Combine the Server With the Editor

An application that also shows the editor installs both packages, the Server package and TXTextControl.TXSheetControl.AspNetCore or TXTextControl.TXSheetControl.Blazor. Check the browser files of the editor and the output of the server separately.

Next Steps