Notifications
Clear all

MMCS 1.6.4a Calibration CSV export does not respect locale

3 Posts
2 Users
0 Likes
8,692 Views
(@champion)
New Member
Joined: 11 years ago
Posts: 3
Topic starter  

The CSV file generated by MCS (outputting the calibration parameters for an antenna etc.) has non-standard delimiters which makes it very hard to use in the UK

In the UK (and US) a file with commas for thousands separators and semicolons separating fields is much harder to deal with than the usual CSV seen in these locales.

The usual would be:

Decimal separator: <period>
Thousands separator: <none>
Field separator: <comma>
Record separator <newline>

I presume you chose these delimiters to be consistent with some convention in Germany, but it would be nice if it was possible to respect the locale setting on a computer and hence generate something that Excel would gobble up without complaint.


   
Quote
(@champion)
New Member
Joined: 11 years ago
Posts: 3
Topic starter  

One simple approach would be to output files with extension .csv but with with a first line which reads:

sep=;

(or edit the file in a suitable text editor)

This is read by Excel as an instruction rather than data and it is then happy with the thousands separators too.


   
ReplyQuote
(@mm_dev)
Reputable Member Admin
Joined: 13 years ago
Posts: 330
 

Using your proposed separators unfortunately causes major problems with other localized software (esp. Excel) when for example comma is used as decimal separator by the system locale. And the CSV export simply uses the system locale for number formatting for that reason, which usually uses period and comma so they can't be used as field separators.
I'll look into the sep=; thing if it works with other applications.


   
ReplyQuote
Share: