Check out the LimeSurvey source code on GitHub!

Row separator in csv file

More
5 years 7 months ago - 5 years 7 months ago #62632 by waitz
I have to change the separator in exportresults.php from comma to another character, but the rows in the csv file don't have a separator.

How can I add a row separator in exportresults.php to the csv file?

I changed the separator in line 295:
case "csv":
        header("Content-Disposition: attachment; filename=results-survey".$surveyid.".csv");
        header("Content-type: text/comma-separated-values; charset=UTF-8");
        $separator="~|";
        break;

Version 1.91+ Build 11232 | PHP 5.3.9 | MySQL 5.1.56 |
Last Edit: 5 years 7 months ago by waitz.

Please Log in to join the conversation.

More
5 years 7 months ago #62653 by waitz
Hmmm, it looks like it creates a row separator: \n

But this separator is also created when someone presses enter in a text area, which creates a mess.

Where can I change the separator character for the rows in the csv file (only)?

Version 1.91+ Build 11232 | PHP 5.3.9 | MySQL 5.1.56 |

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form