テキストを .csv ファイルに出力する際に問題があります。私の文字列にはコンマが含まれており、最終的に 1 つではなく 2 つのセルに出力されます。コードは次のとおりです。
String companyName1 = "Edison Corporation, LLC co";
String profit1 = "$100";
String fileName = "Result.csv";
File file = new File(fileName);
output = new PrintWriter(file);
output.println(companyName+","+profit);
//This gives me the following:
// Edison Corporation LLC co $100
//I need:
// Edison Corporation, LLC co $100