I want to write comma separated data in CSV file. Writing http request response in it.
Following is the code-
FileWriter fw = new FileWriter(Constants.LOGGING_FILE_PATH, true);
fw.write(currTime + ","+ responseBody);
fw.write(System.getProperty( "line.separator" ));
fw.flush();
fw.close();
Now problem is response is multiline, So when data is shown in Excel it messed up. I have attached screen shot. Can I have all data in one cell. Like ALT+ENTER.