Using a different character to separate columns in a csv-file


#1

Hi,
is there any posibility to use a “;” (semicolon) instead of a “,” (comma) to separate colums in a csv-file?

The reason is, the the user who makes this file, uses comma within a string (column). Excel separates columns by “;”


#2

Sounds like your Windows regional settings have a list delimiter setup as ; not ,.

You can change that following these notes. Excel will then output a , per the standard.

http://optimalbi.com/blog/2015/07/16/how-to-export-an-excel-file-to-pipe-delimited-file-rather-than-comma-delimited-file/


#3

I have solved it by modifying the file

V 1.7.1 /lib/data/datasetdata.data.class.php line ~334
V 1.8.4 /lib/Helper/DataSetUploadHandler.php lines ~74

old: while (($data = fgetcsv($handle)) !== FALSE ) {

new: while (($data = fgetcsv($handle, null, ‘;’)) !== FALSE ) {