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.
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 TXText ╰ TX Text Control .NET for Windows Forms
╰ TXTextControl Namespace
╰ TextControl Class
╰ IsFormulaCalculationEnabled Property
Gets or sets a value indicating whether formulas in tables are automatically calculated when the text of an input cell is changed. .
If an Excel document contains more worksheets, the TXText ╰ TX Text Control .NET for Windows Forms
╰ TXTextControl Namespace
╰ LoadSettings Class
╰ GetDocumentPartNames Method
SpreadsheetML only. 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 TXText ╰ TX Text Control .NET for Windows Forms
╰ TXTextControl Namespace
╰ LoadSettings Class
╰ DocumentPartName Property
SpreadsheetML only. .
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.
string[] sDocumentParts = LoadSettings.GetDocumentPartNames("cash_excel.xlsx", | |
StreamType.SpreadsheetML); | |
LoadSettings ls = new LoadSettings(); | |
foreach (string documentPart in sDocumentParts) | |
{ | |
ls.DocumentPartName = documentPart; | |
textControl1.Append("cash_excel.xlsx", | |
StreamType.SpreadsheetML, | |
ls, | |
AppendSettings.StartWithNewSection); | |
} |
Test this on your own and download a trial version of TX Text Control X16.