Anyone has any idea to write a csv file with multiple lines in a cell? what is the special character needed to go to the next line? i tried /r and /n already, but it will go into a new row instead of next line in a cell.
There is no standard way that I know of to have a single cell in a CSV file occupy multiple rows or columns. By definition, a CSV file has one data row per file line, and one data cell per element in that line. You'll have to define your own format, or use something like Apache POI to handle it as an Excel file. Excel can have a single cell span multiple columns or rows, but it does so in its own format, not simple CSV.
On Windows® they use \r\n as line breaks and on *nix (Unix, Linux, newer Macs, etc) they use \n alone. I think only old Macs used \r, but the whole thing looks like a flaky platform‑dependent solution to me.