TX Text Control .NET Server

What's New in TX Text Control .NET Server 26.0

Topic

Track changes, formulas in table cells and the import of Excel workbooks came to TX Text Control .NET Server with version 26.0. Mail merge gained filters, sorting and conditions for merge blocks, and the Document Editor's JavaScript API received get and set methods for most formatting attributes.

Version 26.0 was released on November 14, 2018, as TX Text Control X16, together with TX Text Control .NET for Windows Forms, TX Text Control .NET for WPF, TX Text Control ActiveX and TX Barcode .NET 5.0. Its last full installer, that of Service Pack 1, is dated May 31, 2019. The features below are the ones added since version 25.0.

Version 26.0 at a Glance

AreaWhat is new
Track changesInserted and deleted text marked per user, accepted or rejected in code or in the editor
File formatsImport of Excel workbooks (XLSX) with StreamType.SpreadsheetML
TablesFormulas with A1 or R1C1 references, number formats, new keyboard behavior
Mail mergeRemoval of empty lines, conditions, filters and sorting instructions for merge blocks
Document EditorTrack changes on the Proofing tab, formulas on the table layout tab, formatting in the JavaScript API

Track Changes

With track changes switched on, TX Text Control marks every text change with the user who made it. See Track Changes for the .NET API and Track Changes for the Document Editor.

Excel Workbooks

TX Text Control loads files and memory blocks in SpreadsheetML, the spreadsheet part of Office Open XML and the default format of MS Excel (XLSX). The StreamType enumeration received the value SpreadsheetML.

Supported File Formats lists the formats of today's version.

Formulas and Number Formats in Tables

A table cell can calculate its content from other cells with a formula, which is loaded from a SpreadsheetML document or set in code. See Tables for the .NET API and Tables for the Document Editor.

  • Formulas. TableCell.Formula sets the formula of a cell. The result is updated when an input cell changes, unless IsFormulaCalculationEnabled is false. A formula cell can be the input of another formula. References to other tables or documents aren't supported. TableCollection.SupportedFormulaFunctions lists the functions a formula can use.
  • Cell references. FormulaReferenceStyle switches between two notations. A1 names the column with a letter and the row with a number: B3 is the cell in the third row and the second column. R1C1 names both with numbers: R3C2 is the same cell. In R1C1, numbers in square brackets are relative to the formula's cell: R[-3]C[-2] is three rows above and two columns to the left.
  • Number formats. TableCellFormat.NumberFormat formats the result. Only formats for positive numbers are supported; TableCollection.SupportedNumberFormats lists them.
  • Errors. An invalid formula or number format throws a FormulaException or a NumberFormatException, each with the one-based index of the first invalid character.
  • Ruler bars. RulerBarViewGenerator.FormulaMode shows the references of all cells, or of the formula cells only, in the editor's ruler bars, in the notation that FormulaReferenceStyle sets.

Keyboard Behavior in Tables

Two keys work differently in tables since version 26.0:

  • The TAB key in the last cell of a table adds a new row at the end of the table.
  • The ENTER key at the first input position of a document that starts with a table inserts an empty line before the table.

Mail Merge

MailMerge creates documents from a template and data. Version 26.0 gave it more control over empty lines and over merge blocks, the sections of a template that are repeated for each record.

  • Empty lines. MailMerge.RemoveEmptyLines removes lines that are empty after the data has been merged.
  • Conditions. MergeBlockInfo.BlockMergingCondition decides whether a block is merged or left out, from a column of the parent data row and a comparison such as "greater than", "is not blank" or "equal to".
  • Filters and sorting. MergeBlockInfo.Filters takes FilterInstruction objects, which can be combined with "and" and "or". MergeBlockInfo.SortingInstructions takes SortingInstruction objects, which sort in ascending or descending order by several columns.
  • Created tables. MergeBlockSettings.CreatedTable and TableID describe the table that DataSourceManager.InsertMergeBlock created for a block.

See Conditional Content and Sorting and Filtering.

Document Editor

  • Ribbon tabs. The Proofing tab received a Track Changes group that switches tracking on and off, accepts and rejects changes and moves to the next or previous change. The table layout tab sets formulas and number formats.
  • JavaScript API. Selections, paragraph formats, section formats, page borders, page margins and page sizes received get and set methods for their attributes. TXTextControl.isTrackChangesEnabled switches track changes, loadJsonData loads JSON merge data, and showSideBar shows a sidebar.

Other API Additions

  • Loading. LoadSettings received properties such as LoadImages, LoadHypertextLinks, ImageSearchPath, PageSize and PageMargins, which appear in the What's New list below.
  • Saving. SaveSettings.OmittedContent specifies data that is left out when a document is saved.
  • Subtext parts. SubTextPart.Data stores additional data with a subtext part as a string.

Upgrade to Version 26.0

  • No update notes. No update notes were published for version 26.0.
  • Breaking changes. No change of version 26.0 is known to break existing code. Breaking Changes starts with version 30.0.

New Classes, Properties, Methods and Events

These are the classes and members that the What's New documentation of version 26.0 lists for TX Text Control .NET Server. .NET names are relative to the TXTextControl namespace. Each name links to its current reference page, and "(obsolete)" marks the members that are obsolete today. Some classes that existed before, such as LoadSettings and TableCollection, are listed because members were added to them.

New Classes

.NET Members by Class

ClassPropertiesMethodsEvents
CannotTrackChangeEventArgsCancel, DefaultMessage, Handled
DocumentServer.DataShaping.FilterInstructionColumnName, CompareTo, ComparisonOperator, LogicalOperator
DocumentServer.DataShaping.SortingInstructionOrderBy, SortOrder
DocumentServer.DataSources.MergeBlockInfoBlockMergingCondition, Filters, SortingInstructions
DocumentServer.DataSources.MergeBlockSettingsCreatedTable, TableID
DocumentServer.MailMergeRemoveEmptyLines
FormulaExceptionCharacterIndex
HeaderFooterTrackedChanges
IFormattedTextTrackedChanges
InputFormatNumberFormat, NumberTextType, StandardTextType
LoadSettingsAddParagraph, BytesRead, CssFileName, DocumentPartName, DocumentTitle, ImageSearchPath, LoadedFile, LoadedStreamType, LoadHypertextLinks, LoadImages, PageMargins, PageSizeGetDocumentPartNames
NumberFormatExceptionCharacterIndex
SaveSettingsOmittedContent
ServerTextControlFormulaReferenceStyle, IsFormulaCalculationEnabled, TrackedChangesOnTrackedChangeCreated, OnTrackedChangeDeletedTrackedChangeCreated, TrackedChangeDeleted
ServerVisualization.RulerBarViewGeneratorFormulaMode
ServerVisualization.TextViewGeneratorIsTrackChangesEnabled, ViewModeOnCannotTrackChange, OnMainTextActivated, OnTextFrameActivated, OnTextFrameDeactivated, OnTrackedChangeChanged, OnTrackedChangeStateChangedCannotTrackChange, MainTextActivated, TextFrameActivated, TextFrameDeactivated, TrackedChangeChanged, TrackedChangeStateChanged
SubTextPartData
TableCellCellFormat, Column, Formula, Length, Position, Row, Start, Text, Width
TableCellFormatNumberFormat, TextType
TableCollectionCanAdd, GridLines, SupportedFormulaFunctions, SupportedNumberFormatsAdd, GetItem, Remove
TextFrameTrackedChanges
TrackedChangeActive, ChangeKind, ChangeTime, DefaultHighlightColor, HighlightColor, HighlightMode, Length, Number, Start, Text, UserNameSave, ScrollTo, Select
TrackedChangeCollectionCount, IsSynchronized, Item, SyncRootCopyTo, GetEnumerator, GetItem, Remove
TrackedChangeEventArgsTrackedChange
Web.MVC.TextControlSettingsUserNames

Document Editor JavaScript API

ObjectPropertiesMethods
PageBordergetBottomDistance, getBottomLineColor, getBottomLineWidth, getFirstPageOnly, getLeftDistance, getLeftLineColor, getLeftLineWidth, getMeasureFromText, getOmitFirstPage, getRightDistance, getRightLineColor, getRightLineWidth, getSurroundFooter, getSurroundHeader, getTopDistance, getTopLineColor, getTopLineWidth, setBottomDistance, setBottomLineColor, setBottomLineWidth, setFirstPageOnly, setLeftDistance, setLeftLineColor, setLeftLineWidth, setMeasureFromText, setOmitFirstPage, setRightDistance, setRightLineColor, setRightLineWidth, setSurroundFooter, setSurroundHeader, setTopDistance, setTopLineColor, setTopLineWidth
PageMarginsgetBottom, getLeft, getRight, getTop, setBottom, setLeft, setRight, setTop
PageSizegetHeight, getWidth, setHeight, setWidth
ParagraphFormatgetAbsoluteLineSpacing, getAlignment, getBackColor, getBottomDistance, getDirection, getFrame, getFrameDistance, getFrameLineColor, getFrameLineWidth, getFrameStyle, getHangingIndent, getJustification, getKeepLinesTogether, getKeepWithNext, getLeftIndent, getLineSpacing, getPageBreakBefore, getRightIndent, getTabPositions, getTabTypes, getTopDistance, getWidowOrphanLines, setAbsoluteLineSpacing, setAlignment, setBackColor, setBottomDistance, setDirection, setFrame, setFrameDistance, setFrameLineWidth, setFrameStyle, setHangingIndent, setJustification, setKeepLinesTogether, setKeepWithNext, setLeftIndent, setLineSpacing, setPageBreakBefore, setRightIndent, setTabPositions, setTabTypes, setTopDistance, setWidowOrphanLines
SectionFormatpageBorder, pageMargins, pageSizegetBreakKind, getColumnDistances, getColumnLineColor, getColumnLineWidth, getColumns, getColumnWidths, getEqualColumnWidth, getLandscape, getRestartPageNumbering, setBreakKind, setColumnLineColor, setColumnLineWidth, setColumns, setColumnWidths, setEqualColumnWidth, setLandscape, setRestartPageNumbering
SelectionlistFormat, paragraphFormat, sectionFormatgetBaseline, getBold, getCulture, getFontName, getFontSize, getForeColor, getFormattingStyle, getItalic, getStrikeout, getText, getTextBackColor, getUnderline, setBaseline, setBold, setCulture, setFontName, setForeColor, setFormattingStyle, setItalic, setText, setTextBackColor, setUnderline
SubTextPartInfohighlightMode, id, length, name, start
TextPartaddSubTextPart (obsolete), removeSubTextPart (obsolete)
TXTextControlisTrackChangesEnabled (obsolete)loadJsonData, showSideBar

Next Steps

  • Version 27.0: the features of the next version.
  • Version 25.0: the features of the previous version.
  • Older Versions: all versions from 29.0 back to 10.1.
  • TX Text Control X16 and TX Barcode .NET 5.0 Released: the release announcement on the Text Control Blog.