How is a CSV file built in general? With commas or semicolons? Any advice on which one to use?
In North America and some other countries, the default list separator is a comma, so you get CSV comma delimited. In European countries, a comma is reserved for the decimal symbol, and the list separator is generally set to semicolon.
Depending on your Excel's regional setting, your default delimiter/separator may either be using semicolons (;) or commas (,) to separate items in a CSV file.
CSV is a Comma Seperated File. Generally the delimiter is a comma, but I have seen many other characters used as delimiters.
CSV , or Comma-separated Values, is an extremely common flat-file format that uses commas as a delimiter between values. Anyone familiar with spreadsheet programs has very likely encountered CSV files before - they're easily consumed by Google Spreadsheet, Microsoft Excel, and countless other applications.
In Windows it is dependent on the "Regional and Language Options" customize screen where you find a List separator. This is the char Windows applications expect to be the CSV separator.
Of course this only has effect in Windows applications, for example Excel will not automatically split data into columns if the file is not using the above mentioned separator. All applications that use Windows regional settings will have this behavior.
If you are writing a program for Windows that will require importing the CSV in other applications and you know that the list separator set for your target machines is ,
, then go for it, otherwise I prefer ;
since it causes less problems with decimal points, digit grouping and does not appear in much text.
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