Skip to main content
A newer version of this page is available. .
All docs
V21.2
.NET Framework 4.5.2+
Row

ISpreadsheetComponent.BeforeEncodingDetection Event

Occurs before detecting the encoding of the loaded CSV or TXT data.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v21.2.Core.dll

Declaration

event EventHandler<BeforeEncodingDetectionEventArgs> BeforeEncodingDetection

Event Data

The BeforeEncodingDetection event's data class is BeforeEncodingDetectionEventArgs. The following properties provide information specific to this event:

Property Description
Encoding Gets or sets the document encoding.
Handled Gets or sets whether the event is handled.
Stream Obtains a stream with document data.

Remarks

The BeforeEncodingDetection event is raised when the spreadsheet attempts to detect encoding of the CSV or TXT text being imported. Handle this event to specify a custom encoding instead of the automatically detected encoding.

The event fires only if the TxtDocumentImporterOptions.AutoDetectEncoding or CsvDocumentImporterOptions.AutoDetectEncoding property is set to true.

See Also