I am generating an CSV file in php. I need to print the text in new line inside a cell(I can do this in excel using Ctrl+Enter or Alt+Enter). For that I tried using '\n'
, '\r'
, but nothing helped. How can I achieve this?
I am using yii extension ECSVExport to generate csv.
I want an output like this:
ID Value
1 A
B
2 C
3 E
FF
G
4 X
Try this
"\n"
inside double quote