Problem with Newlines in csv exports
-
To avoid problems with linebreaks when importing exported csv to Excell,
a solution would be to replace in the file cforms2\include\lib_database_dlentries.php, line 282function cforms2_enc_data ( $d, $charset ){ $d = str_replace( array('"',"\r","\n"), array('"',"","\r"),$d ); $d = ( $charset=='utf-8' ) ? $d : utf8_decode($d); return $d; }by
function cforms2_enc_data ( $d, $charset ){ $d = str_replace( array('"',"\r","\n"), array('"'," "," "),$d ); $d = ( $charset=='utf-8' ) ? $d : utf8_decode($d); return $d; }Is it also possible to have a semicolon instead of a comma as a separator in the csv format ? Because it’s easier to have a semicolon than a comma in csv when importing directly into excell. May be a parameter in the form could do the trick.
Thanks,
Hefikz
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Problem with Newlines in csv exports’ is closed to new replies.