title: Writing to CSV through java
body: <p>When writing a column name into a CSV file through java the space between two words in a column comes up as double quotation marks...</p>
  
  <p>eg. test_data[0][36] = "True Accept"; displays as True" Accept in the csv file..</p>
  
  <p>Any ideas how this can be fixed?</p>
  
  <p>Here is the code:</p>
  
  <pre><code>private void writeToCSV() throws IOException {
     CSVWriter writer = new CSVWriter(new FileWriter("list_of_churners.csv"),',',' '); 
     String [] data = new String[40]; 
     for(int i=0;i&lt;341;i++)
     { 
        for(int k=0;k&lt;40;k++)
        {      
           data[k] = test_data[i][k]; 
        }
        writer.writeNext(data); 
     }
     writer.close()
  }
  </code></pre>
  
  <p><strong>EDIT:</strong>  Here is the solution:  </p>
  
  <p><strong>CSVWriter writer = new CSVWriter(new FileWriter("list_of_churners.csv"),',','\t ');</strong> </p>
  
  <p>Changing space ' ' to '\t' fixes the problem.</p>