Skip to main content
A newer version of this page is available. .

TextExportOptionsBase.TextExportMode Property

Gets or sets a value indicating whether to use the formatting of the data fields in the bound dataset for the cells in the exported TXT, CSV, XLS or XLSX document.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v20.2.Core.dll

Declaration

[DefaultValue(TextExportMode.Text)]
public TextExportMode TextExportMode { get; set; }

Property Value

Type Default Description
TextExportMode

Text

A TextExportMode enumeration value.

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.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to TextExportMode
Cross-Platform Class Library ExportOptions
.Csv.TextExportMode
WPF Controls ExportOptionsContainer
.Csv.TextExportMode

Remarks

Use the TextExportMode property to specify whether to use the formatting of the data fields in the bound dataset for the cells in the resulting export document.

Note that if the TextExportMode property is set to Text, all data fields are exported as strings, with the corresponding formatting embedded into those strings. And, if the TextExportMode property is set to Value, all formatting will be lost in the resulting file.

When exporting a PivotGridControl, this property also affects field values (if these values are different from the display text). For example, when a field’s PivotGridFieldBase.GroupInterval is set to Month, this property determines whether it will be exported in numeric or string format.

The following code snippet (auto-collected from DevExpress Examples) contains a reference 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.

See Also