Click or drag to resize
ExcelFileAutoDetectCsvSeparator Method (Stream)
Autodetects CSV separator. If there's no separators in the input stream returns (char)0.

Namespace: GemBox.Spreadsheet
Assembly: GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 39.3.30.1189
Syntax
public static char AutoDetectCsvSeparator(
	Stream stream
)

Parameters

stream
Type: System.IOStream
Input Stream.

Return Value

Type: Char
Char that is CSV separator. If there's no separators in the input StreamReader returns (char)0, and if there are two with equal number of occurance, returns first of them.
Remarks
This method counts the number of occurrences of the most common separators (',', ';', '\t') and returns one that has occurred the most times in first 5 rows.
See Also