title: CSV file with "ID" as first item is corrupt in Excel
body: <p>I am trying to write data to a csv file with java, however when I try opening the produced file with excel I am getting an error saying the file is corrupt. Upon opening the file in notepad it looks to be formatted correctly so I'm not sure what the issue is. I am using the FileWriter class to output the data to the file. </p>
  
  <pre><code>FileWriter writer = new FileWriter("test.csv");
  
  writer.append("ID");
  writer.append(',');
  writer.append("name");
  writer.append(',');
  ...
  writer.append('\n');
  
  writer.flush();
  writer.close();
  </code></pre>
  
  <p>Do I need to use some library in java in order to print to a csv file? I presumed you could just do this natively in java as long as you used the correct formatting. </p>
  
  <p>Appreciate the help, </p>
  
  <p>Shaw</p>