XlExportOptionsBase.TextExportMode Property
Gets or sets a value indicating whether the cells in the resulting XLS document should use the same formatting as the original document.
Namespace: DevExpress.XtraPrinting
Assembly: DevExpress.Printing.v24.1.Core.dll
NuGet Package: DevExpress.Printing.Core
Declaration
Property Value
Type | Description |
---|---|
TextExportMode | A TextExportMode enumeration value, specifying the text export mode in the resulting XLS document. |
Available values:
Name | Description |
---|---|
Value | Exports all data fields to the XLS (or XLSX) file using the same formatting as they have in the original document. |
Text | Exports all data fields to the XLS (or XLSX) file as strings, with the corresponding non-HTML formatting embedded into those strings. HTML tags are ignored. |
Remarks
Use the TextExportMode property to specify whether to use both the .NET and native XLSX formatting of the data fields in the bound dataset for the cells in the exported XLS (or, XLSX) document. Note that if the TextExportMode property is set to Text, all data fields are exported to the XLS (or, XLSX) file as strings, with the corresponding formatting embedded into those strings.
Note
Unfortunately, not all .NET format strings have their equivalents in XLS format. If exact conversion is impossible, the XtraPrinting Library tries to find a string that best resembles the original. For example, the .NET “n4” format that represents a numerical value with 4 decimal places, will be converted as “n2”, to represent this numerical value with 2 decimal places, since the XLS format doesn’t have a built-in numerical format with 3 or 4 decimal places.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the TextExportMode property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.