title: Why doen't this code separate the given numbers into different columns in a .csv file?
body: <p>I've tried to create a program which inserts two numbers into an excel spreadsheet (each one into it's own column). The excel format is .csv.
  This is the written code:</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  
  int main(){
      int n1 = 6, n2 = 1;
  
      std::ofstream my_excel;
      my_excel.open(&quot;test.csv&quot;);
      if (!my_excel.is_open()) return 0;
  
      std::cout &lt;&lt; &quot;The excel file was successfully opened!\n&quot;;
      my_excel &lt;&lt; n1 &lt;&lt; &quot;,&quot; &lt;&lt; n2;
      my_excel.close();
  
      return 0;
  }
  </code></pre>
  <p>This was the expected result in the .csv file:</p>
  <p><a href="https://i.stack.imgur.com/BfNj7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BfNj7.png" alt="This was the expected result in the .csv file" /></a></p>
  <p>This is the actual result I got when I ran the code:</p>
  <p><a href="https://i.stack.imgur.com/Ndy17.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ndy17.png" alt="This is the actual result I got when I ran the code" /></a></p>
  <p>Why weren't the numbers separated into their respective columns? (Ty in advance for your trouble!)</p>