In languages where the decimal separator is a ,(comma) the CSV (comma separated values file format) separator is a ; (semicolon). I know where to find this configuration in the Windows Control Panel, but I don't know how to find it progamatically in a .NET application.
I guess that Thread.CurrentThread.CurrentCulture has that information, but I couldn't find inside it.
To do this: Open your CSV using a text editor. Skip a line at the top, and add sep=; if the separator used in the CSV is a semicolon (;), or sep=, if the separator is a comma (,).
csv file, the default list separator (delimiter) is a comma. You can change this to another separator character using Windows Region settings.
System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator
Is the only way I know how.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With