Since TX Text Control X16 (26.0), Microsoft Excel spreadsheets can be loaded. Worksheets are converted into TX Text Control tables with formatting, formulas and cell number formats.

Excel documents

After a table has been created, included formulas are evaluated automatically and values are calculated when values of referenced cells are changed. By default, the formulas are evaluated automatically, but this can be disabled using the TXTextControl.TextControl.IsFormulaCalculationEnabled property.

If an Excel document contains more worksheets, the TXTextControl.LoadSettings method TXTextControl.LoadSettings.GetDocumentPartNames can be used to retrieve a list of available worksheets in an Excel document. The name of a worksheet can be defined on loading the document using the TXTextControl.LoadSettings.DocumentPartName property.

Excel documents can be loaded, appended and inserted at the current input position. The following code loops through the returned document part names and imports all available worksheets into new sections in a TX Text Control document.

Loading...

Test this on your own and download a trial version of TX Text Control X16.