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 TX Text Control .NET for Windows Forms
DocumentServer Namespace
MailMerge Class
The MailMerge class is a .NET component that can be used to effortlessly merge template documents with database content in .NET projects, such as ASP.NET web applications, web services or Windows services.
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>
view raw test.xml hosted with ❤ by GitHub

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!