TX Sheet Control

Document Processing

Topic

Document processing turns files into workbooks and workbooks into files. TX Sheet Control reads XLSX, ODS and TXWB, updates cells and formulas, merges JSON into templates and saves XLSX, ODS, TXWB or PDF. One worksheet can also be exchanged as UTF-8 CSV, tabular XML or JSON records and rows.

You do this in the browser editor or on a server, where the .NET and Node.js server packages operate independently of the browser editor. Find out how loading and saving works and what an exchange with Excel keeps. For a backend service, see how to run, scale and measure processing.

How It Works

  • One dispatcher for every format. load and save, and in .NET LoadAsync, LoadTextAsync, SaveAsync and SaveTextAsync, take a stream type that selects the format: SpreadsheetML for XLSX, InternalWorkbookFormat for TXWB, PDF, CSV, XML and JSON. A filename extension alone does not select the format.
  • Workbooks or values. XLSX exchanges spreadsheet documents with Excel-compatible applications. TXWB retains TX Sheet Control views, dashboards and report metadata. PDF delivers fixed-page output that cannot be loaded again. CSV, XML and JSON transfer the values of one worksheet, not workbook features.
  • Owners and handles. Each mutable document has an owner: the browser editor or a backend control. Loading replaces the document and invalidates old handles, so you reacquire sheets and ranges after a load.
  • Browser or server. The browser editor loads and saves in the browser, without a server round trip for tabular data. The .NET package TXTextControl.TXSheetControl.Server and the Node.js package @txtextcontrol/tx-sheet-control-server create reports without a browser.

Choose Where Documents Are Processed

Editing and exporting in the editor happen in the browser, in the application page. Backend processing belongs to a .NET or Node.js service or console application. Use a backend when documents must be:

  • Generated on a schedule
  • Processed without a browser
  • Combined with data that must remain on the server

Give unrelated users and jobs separate document instances or deliberately managed sessions. Authentication, authorization, storage, request limits and application data retrieval belong to the host application.

Design a Predictable Pipeline

  1. Load a trusted template or validate an uploaded file.
  2. Resolve the worksheet and the ranges to update.
  3. Apply values, formulas, formatting or mail merge.
  4. Check the warnings and the business totals.
  5. Export the required format and deliver the bytes.
  6. Release the control or document when finished.

Three rules apply to the pipeline:

  • Editor initialization. Await the initialization of the editor before font-sensitive work.
  • Backend tasks and promises. Await every backend task or promise before you use its result or dispose its owner.
  • Handles. Loading replaces document identities, so reacquire your handles after a load.

Find the Right Page

If you want toRead
Load and save XLSX, ODS, TXWB and PDF, get text output and deliver the bytesLoading and Saving Workbooks
Import and export one worksheet as CSV, XML or JSON, with delimiters, schemas and limitsCSV, XML and JSON Data
Validate what an XLSX exchange keeps and choose between XLSX, ODS, TXWB and PDFXLSX Compatibility
Set the title, author and other metadata of exported documentsDocument Properties
Supply fonts with a document or embed the used fonts in the saved fileFonts in Documents
Create reports in a .NET or Node.js backend and return them as an HTTP responseBackend Services
Create and dispose controls, bound parallel requests and group changes in batchesLifetime and Concurrency
Benchmark loading and export and calculate throughputMeasuring Performance
Merge JSON records into a workbook templateMail Merge
Prepare print settings and export worksheets to PDFPDF Export

Where to Start

  1. Loading and Saving Workbooks: the formats, the stream types and the handling of failures.
  2. XLSX Compatibility: validate a representative document before you rely on a conversion.
  3. Backend Services and Lifetime and Concurrency, when you process workbooks on a server.

If you haven't processed a workbook on a server yet, build a first job with .NET or Node.js in Getting Started.

Pages in This Section

  • Loading and Saving Workbooks: the seven formats and their stream types, loading and saving, string output, delivering the bytes, options and failures.

  • CSV, XML and JSON Data: tabular import and export in JavaScript, TypeScript, ASP.NET Core, Angular, Node.js and .NET, with conventions and limits.

  • XLSX Compatibility: conversion warnings, a representative test document, round trips and the choice of format.

  • Document Properties: the metadata of exported documents, inherited template metadata and the differences between formats.

  • Backend Services: the request flow, HTTP responses, pooling, application data and deployment checks.

  • Lifetime and Concurrency: owners of documents, disposal, sessions, bounded concurrency, batches and recovery from errors.

  • Measuring Performance: scenarios, measurements, throughput, warmup, the .NET benchmark sample and the interpretation of results.

  • OpenDocument Spreadsheet: load, edit and save ODS with original-package preservation.

  • Fonts in Documents: fonts supplied with a document, font substitutions and embedded fonts in saved files.