我正在使用 Java 将数据写入 CSV 文件。如何为 CSV 文件中的每一列提供左对齐?
public class WriteToFileCsv
{
public static void main(String[] args) throws IOException
{
FileWriter fw = new FileWriter("WriteTest.csv");
PrintWriter out = new PrintWriter(fw);
out.print("This");
out.print(",");
out.print("is");
out.print(",");
out.print("It's");
out.print(",");
out.print("really");
out.print(",");
out.flush();
out.close();
fw.close();
}
}