title: CSV from text file using node.js (CSV package)
body: <p>I have a file in the format of "data1,data2".</p>
  
  <p>For example:
  France,Paris
  United Kingdom, London
  Germany, Berlin
  etc.. etc..</p>
  
  <p>I want to convert this into CSV and I use the csv package in node.js. 
  The code I used is:</p>
  
  <pre><code>csv()
  .from(fs.createReadStream('./test.txt'))
  .to(fs.createWriteStream('./file.csv'))
  </code></pre>
  
  <p>When I open file.csv in excel I have an output of 1 column and as many rows as the data. However I want to create two different columns. </p>
  
  <p>I didn't find any example of how to do so on the net. Any advice/help is greatly appreciated!</p>