# Server-Side Spreadsheet Processing and Reporting with TX Sheet Control in .NET and Node.js

> Learn how TX Sheet Control creates, merges, and exports workbooks in .NET and Node.js without a browser. This article covers mail merge with visually designed templates, typed bindings and diagnostics, PDF output, and a report pipeline for invoices and reports.

- **Author:** Bjoern Meyer
- **Published:** 2026-12-01
- **Modified:** 2026-12-01
- **Description:** Learn how TX Sheet Control creates, merges, and exports workbooks in .NET and Node.js without a browser. This article covers mail merge with visually designed templates, typed bindings and diagnostics, PDF output, and a report pipeline for invoices and reports.
- **9 min read** (1644 words)
- **Tags:**
  - Spreadsheet
  - Reporting
  - MailMerge
  - .NET
  - Node.js
  - PDF
- **Web URL:** https://www.textcontrol.com/blog/2026/12/01/server-side-spreadsheet-processing-and-reporting-with-tx-sheet-control/
- **LLMs URL:** https://www.textcontrol.com/blog/2026/12/01/server-side-spreadsheet-processing-and-reporting-with-tx-sheet-control/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2026/12/01/server-side-spreadsheet-processing-and-reporting-with-tx-sheet-control/llms-full.txt

---

Many business documents are spreadsheets at heart. Invoices, quotations, price lists, timesheets, and financial reports consist of rows, columns, formulas, and totals. In most applications, these documents are not created by a user sitting in front of an editor. They are generated automatically, from application data, on a schedule, or in response to an API request.

In this article, we look at the server-side processing of TX Sheet Control: how workbooks are created, merged, and exported in .NET and Node.js without a browser, and how mail merge turns workbook templates into finished business documents.

### Why Generating Spreadsheets in Code Is Fragile

Generating spreadsheet documents on a server seems straightforward on paper: write some values into cells and save the file. In practice, it rarely stays that simple.

Business documents need formatting, formulas that calculate totals, tables that grow with the data, and print settings that produce clean PDF pages. Writing all of this cell by cell in code results in fragile programs that only developers can change. Every adjustment to the layout of an invoice becomes a code change, a test cycle, and a deployment.

Automating a desktop spreadsheet application is not an alternative. Desktop programs were never designed for unattended execution in services, containers, or the cloud.

What is needed is a native processing engine that works with real workbook templates and runs wherever your backend runs.

### Two Server Packages, One Document Model

TX Sheet Control includes two independent server packages:

- **.NET:** `TXTextControl.TXSheetControl.Server`, for .NET 10 or newer, with an asynchronous API and cancellation support.
- **Node.js:** `@txtextcontrol/tx-sheet-control-server`, for Node.js 22 or newer, with ES modules and CommonJS support.

Both packages load, edit, calculate, merge, and save workbooks without a browser, a DOM, or the editor. They use the same document model as the browser editor: worksheets, ranges, formulas, tables, charts, and dashboards follow the same concepts on every platform. A template designed in the editor is processed on the server as the user designed it.

In .NET, the Blazor editor package includes the same portable C# document API as the .NET server package. Code that fills a template or formats a range runs unchanged against the browser editor and against `ServerSheetControl`. To process an edited workbook on the server, the application saves it as TXWB or XLSX and passes the bytes to the backend.

Architecturally, this has important consequences:

- **No browser required:** The server packages run in your application, without a browser.
- **Independent of the editor:** The server packages need no editor package, and the editor needs no server package.
- **Complete:** Calculation, mail merge, pivot tables, barcodes, XLSX, ODS, TXWB, and PDF are included, together with the fonts.
- **Offline:** Licensing works without activation or licensing network calls.

### Mail Merge: Templates Instead of Code

A more maintainable way to generate business documents is to separate the document design from the data. With TX Sheet Control, the layout lives in a workbook template, and your application supplies the data as JSON.

![Invoice template with merge fields](https://s1-www.textcontrol.com/assets/dist/blog/2026/12/01/f/assets/mail_merge.webp "Invoice template with merge fields")

A template combines values, formulas, styles, print settings, and bindings:

- **Fixed bindings:** Write single values, such as the customer name, into their cells.
- **Merge blocks:** Expand a band of template rows for each element of an array, such as the lines of an invoice.
- **Formulas:** Remain formulas and calculate the totals after the expansion.

#### Designing Templates Visually

Templates do not have to be written in code. They are designed in the spreadsheet editor on the Reporting tab, which inserts, edits, and deletes merge fields and merge blocks. Field Properties set the field path in the JSON data and its type: text, number, Boolean, or ISO date.

![Merge Field Properties dialog](https://s1-www.textcontrol.com/assets/dist/blog/2026/12/01/f/assets/merge_field.webp "Merge Field Properties dialog")

Bound fields and merge blocks are marked in the editor with colored guides, which never appear in PDF or XLSX output. This means that business users can maintain the templates themselves, while developers maintain the data. When the invoice layout changes, nobody changes code.

#### Merge Results You Can Trust

A document generator must never silently produce wrong documents. Mail merge in TX Sheet Control is built for reliability:

- **Typed bindings:** Text, numbers, Boolean values, and dates are written as correctly typed cell values.
- **Policies:** Define whether missing values raise an error or clear the cell, and whether null values raise an error, clear the cell, or are preserved.
- **Limits:** A maximum number of repeat items protects the server from unexpectedly large data.
- **Diagnostics:** Every merge returns warnings, formula errors, and the expanded ranges.

A reusable template captures the original workbook once, and every merge returns an independent workbook. In batch processing, each record is merged from the template on its own.

### PDF Output for Business Documents

In most business processes, the final deliverable is a PDF. TX Sheet Control creates fixed pages from the document content, the print settings, and the deployed fonts, with vector graphics and embedded fonts.

![Page Setup dialog](https://s1-www.textcontrol.com/assets/dist/blog/2026/12/01/f/assets/page_setup.webp "Page Setup dialog")

The print settings of the template define the paper size, orientation, margins, print area, and scaling. Headers and footers carry fields for the page number, page count, date, time, sheet name, and file name. For business and compliance requirements, PDF export provides:

- **Tagged PDF:** Created by default, with an option for PDF/UA-1 metadata and strict accessibility preflight checks.
- **Encryption:** AES-256 encryption with standard reader permissions.
- **Metadata:** Title, author, subject, keywords, and further document properties.
- **Reproducibility:** Set a fixed locale, time zone, and date when documents must be reproducible.

> **Learn more**
> 
> Learn how TX Sheet Control loads, edits, and saves Excel XLSX workbooks with their formulas, formatting, tables, charts, and native pivot tables. This article covers conversion diagnostics, hardened import for untrusted files, and the other supported formats.
> 
> [Excel Compatibility in TX Sheet Control: Working with the Workbooks Your Users Already Have](https://www.textcontrol.com/blog/2026/12/01/excel-compatibility-in-tx-sheet-control/llms-full.txt)

### A Report Pipeline in Five Steps

A typical invoice pipeline with TX Sheet Control follows five steps:

1. **Author:** Design the invoice template in the editor and save it as TXWB.
2. **Validate:** Validate the requested template and the authorized data in your application.
3. **Merge:** Load a clean copy of the template and merge the JSON data.
4. **Check:** Inspect the merge diagnostics and verify key values, such as the total.
5. **Deliver:** Export the result as PDF or XLSX and return it, for example from an ASP.NET Core endpoint.

The processing engine stays separate from authentication, storage, data retrieval, and delivery, which remain the responsibility of your application. This clear separation keeps the pipeline testable and secure.

### Built for Production Workloads

Server-side document generation must be predictable under load. Keep a warm pool of processing controls to avoid repeated initialization, and bound concurrency with queues or worker pools to keep resource usage under control. Timeouts and cancellation stop long-running jobs, and every job reloads a clean template, so no state leaks from one document to the next.

The .NET package copies its fonts and resources into the build and publish output, so deployment requires no additional steps. A file is replaced only after successful serialization, and caller streams stay open, so a failed save does not corrupt an existing file.

> **Learn more**
> 
> Today, we are proud to officially release TX Sheet Control 2.0. The newest member of the Text Control product family brings Excel-compatible spreadsheet editing, a powerful calculation engine, pivot tables, interactive dashboards, and server-side workbook processing to JavaScript, Angular, ASP.NET Core, Blazor, .NET, and Node.js applications.
> 
> [TX Sheet Control 2.0 Is Now Available: Spreadsheets and Dashboards for Your Applications](https://www.textcontrol.com/blog/2026/12/01/tx-sheet-control-2-0-is-now-available/llms-full.txt)

### Conclusion: Business Documents from Spreadsheet Templates

Generating spreadsheet documents cell by cell in code is fragile, and automating desktop applications does not scale. TX Sheet Control separates the document design from the data and processes real workbook templates natively on the server.

Server-side processing with TX Sheet Control is:

- Native in .NET and Node.js, without a browser or external applications
- Template-based, with templates that business users design visually
- Reliable, with typed bindings, policies, and merge diagnostics
- Ready for production, with optional PDF/UA-1, AES-256 encryption, and cancellation

If your application creates invoices, quotations, or reports from data, TX Sheet Control turns your workbook templates into a document pipeline.

[Download trial ](https://www.textcontrol.com/product/tx-sheet-control/download/trial/ "Download Trial")

### Frequently Asked Questions

Can TX Sheet Control process workbooks without a browser? 
----------------------------------------------------------

Yes. The .NET package `TXTextControl.TXSheetControl.Server` and the Node.js package `@txtextcontrol/tx-sheet-control-server` load, edit, calculate, merge, and save workbooks without a browser, a DOM, or the editor.

How does mail merge work in TX Sheet Control? 
----------------------------------------------

Mail merge fills a workbook template from a JSON record. Fixed bindings write single values into their cells, merge blocks expand template rows for each element of an array, and formulas calculate the totals after the expansion.

Who designs the templates? 
---------------------------

Templates are designed visually in the spreadsheet editor on the Reporting tab, which inserts and edits merge fields and merge blocks. Business users maintain the layout, while the application supplies the data.

Which PDF features are available? 
----------------------------------

PDF export creates vector output with embedded fonts. It supports tagged PDF with an option for PDF/UA-1 metadata, AES-256 encryption, document metadata, and a fixed locale, time zone, and date for reproducible output.

Which .NET version does the server package require? 
----------------------------------------------------

The .NET server package requires .NET 10 or newer. The Node.js server package requires Node.js 22 or newer and works with ES modules and CommonJS applications.

---

## About Bjoern Meyer

As CEO, Bjoern is the visionary behind our strategic direction and business development, bridging the gap between our customers and engineering teams. His deep passion for coding and web technologies drives the creation of innovative products. If you're at a tech conference, be sure to stop by our booth - you'll most likely meet Bjoern in person. With an advanced graduate degree (Dipl. Inf.) in Computer Science, specializing in AI, from the University of Bremen, Bjoern brings significant expertise to his role. In his spare time, Bjoern enjoys running, paragliding, mountain biking, and playing the piano.

- [LinkedIn](https://www.linkedin.com/in/bjoernmeyer/)
- [X](https://x.com/txbjoern)
- [GitHub](https://github.com/bjoerntx)

---

## Series

- [TX Sheet Control 2.0 Is Now Available: Spreadsheets and Dashboards for Your Applications](https://www.textcontrol.com/blog/2026/12/01/tx-sheet-control-2-0-is-now-available/llms.txt)
- [Inside the TX Sheet Control Spreadsheet Editor: A Complete Spreadsheet for Your Web Applications](https://www.textcontrol.com/blog/2026/12/01/inside-the-tx-sheet-control-spreadsheet-editor/llms.txt)
- [Excel Compatibility in TX Sheet Control: Working with the Workbooks Your Users Already Have](https://www.textcontrol.com/blog/2026/12/01/excel-compatibility-in-tx-sheet-control/llms.txt)
- [Pivot Tables and Data Analysis with TX Sheet Control: Let Your Users Answer Their Own Questions](https://www.textcontrol.com/blog/2026/12/01/pivot-tables-and-data-analysis-with-tx-sheet-control/llms.txt)
- [Interactive Dashboards with TX Sheet Control: Spreadsheets and Dashboards in One Workbook](https://www.textcontrol.com/blog/2026/12/01/interactive-dashboards-with-tx-sheet-control/llms.txt)
- **Server-Side Spreadsheet Processing and Reporting with TX Sheet Control in .NET and Node.js** (this article)

---

## Related Posts

- [TX Sheet Control 2.0 Is Now Available: Spreadsheets and Dashboards for Your Applications](https://www.textcontrol.com/blog/2026/12/01/tx-sheet-control-2-0-is-now-available/llms.txt)
