Products Technologies Demo Docs Blog Support Company

Sneak Peek X16: Working with Formulas in Table Cells

Version X16 is going to support Microsoft Excel compatible formulas to calculate values dynamically.

Sneak Peek X16: Working with Formulas in Table Cells

We did not announce an official release date for version X16 (26.0), but we already published several articles explaining features we are working on.

Today, we would like to present another feature that will be part of TX Text Control X16: Microsoft Excel compatible formulas in tables. Consider a value of a table cell that is calculated dynamically based on other table cell values. Typically, a SUM formula is inserted at the end of a table to create a total sum value. Or a tax value that is calculated based on a tax percentage value and the calculated total sum.

Consider the following very basic table with a formula at the end that basically creates a sum of the above table rows. Cell references contained in formulas must use the relative R1C1 reference style (example: R[-1]C[3]).

Table with formula

When the referenced cell values are changed, the cell with the formula is calculated dynamically:

Table with formula

TX Text Control will support 60+ formulas including most mathematical and trigonometric formulas compatible to Microsoft Excel. Additionally, in TX Text Control X16 it will be possible to load Excel XLSX files directly in order to import the spreadsheet into a table including formulas and table number formats.

This feature is getting interesting in combination with TXTextControl.DocumentServer.MailMerge class where referenced cells are populated with data dynamically.

Consider the following template showing a balance sheet:

Table with formula

The following sample data is used to merge the template:

<report>
        <balancesheet>
                <cash>234</cash>
                <accounts_receivable>123</accounts_receivable>
                <inventory>3424</inventory>
        </balancesheet>
        <balancesheet>
                <cash>223</cash>
                <accounts_receivable>8982</accounts_receivable>
                <inventory>9000</inventory>
        </balancesheet>
</report>

The merge fields are populated with data from the XML and the formula cells are updated automatically:

Table with formula

Table cell formulas allow you to create views with calculated fields that are not part of your business object or pre-shaped data. Together with the new filter and sorting options for repeating blocks, MailMerge is getting even more flexible.

Stay tuned for more!

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Also See

This post references the following in the documentation:

  • TXTextControl.DocumentServer.MailMerge Class

Related Posts

ASP.NETWindows FormsWPF

TX Text Control 33.0 SP3 is Now Available: What's New in the Latest Version

TX Text Control 33.0 Service Pack 3 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…


ASP.NETWindows FormsWPF

TX Text Control 33.0 SP2 is Now Available: What's New in the Latest Version

TX Text Control 33.0 Service Pack 2 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…


ActiveXASP.NETWindows Forms

Service Pack Releases: What's New in TX Text Control 33.0 SP1 and 32.0 SP5

TX Text Control 33.0 Service Pack 1 and TX Text Control 32.0 Service Pack 5 have been released, providing important updates and bug fixes across platforms. These service packs improve the…


ASP.NETWindows FormsWPF

The Wait is Over: TX Text Control for Linux is Officially Here

We are very excited to announce the release of TX Text Control 33.0 which includes the long awaited Linux version of TX Text Control. This version allows you to integrate TX Text Control into your…


ASP.NETWindows FormsWPF

Full .NET 9 Support in Text Control .NET Components for ASP.NET Core,…

.NET 9 will be launched tomorrow, November 12, at the .NET Conf 2024 with updates to cloud capabilities, security, and performance. TX Text Control .NET components are fully compatible with .NET 9…