Exported CSV files not compatible with the French edition of MS Excel

In every CSV file generated by iNaturalist, insert this at the first line:
sep=,

Don’t put anything else on this first line. The CSV file opened in a text editor should show as follows:

This indicates to the sofware that opens the document (e.g. MS Excel) that a comma is used as the column separator.

It is important because in French we use the comma, not the dot, as the decimal “point”, for writing floating “point” numbers (in French we say: floating comma numbers). This implied (I guess) that a semicolon was adopted as the default column separator in CSV files in France. As a consequence, a CSV file not using the semicolon as the default column separator will not be opened correctly by a French edition of MS Excel. Fortunately there is a way to specify within the CSV file (basically a text file) another separator than the default one.

Adding this extra line in the CSV file will NOT impact non-French editions of MS Excel.

5 Likes

Maybe the world is bigger then Microsoft?

2 Likes

Did you try it with another software?

How would a software be able to guess which separator the author of the CSV file intended to use?
I think the root cause is not on the software editor side, it is on the (French) CSV format side, but it can be fixed easily, to make the CSV format really international.

Most software I’ve seen allows you to pick a separator during import, in case your file does not use the default. Does Excel not support this? :confused:

2 Likes

Yes, this should be able to be switched when you import the file. Danish uses the same ‘reversed’ comma and point from North American number formats, and I have no issues once I configure the import window options.

These are workarounds. Not a fix. IT means automating what can be.

The fix needed is the less expensive possible to do. Just like fixing a spelling mistake.

The use of metadata like sep= is a non-standard Microsoft convention that would break many applications that read the most common formats of CSV. The international standard is documented as RFC 4180. It allows an optional header (specifying the column names) on the first line, but nothing else. Before this standard was established in 2005, there were many different formats in use (and there obviously still are). It is this lack of a long-established standard that explains why most applications allow the user to specify the exact format when opening CSV files.

I suppose the iNat export page could also provide an option for controlling its output format. However, a lot of users probably won’t understand which one they should use, so a more sophisticated solution might automatically select the output format based on the user’s locale settings.

3 Likes

This option could be in the “Edit Your Account & Profile” page, and could specify the CSV separator, with a preselection at the account creation time based on the user’s locale settings.

1 Like

I think it would be better to have it on the export page itself, because people may want to send the file to someone else. So there would be a drop-down list of output formats, which would default to whatever is most apporopriate for the user’s locale.

2 Likes

Moved this out of Bug Reports because this is working as designed. Since the vast majority of users are not downloading CSV files, I support @bazwal’s suggestion of adding a dropdown, if we decide to go this route.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.