title: Python formatting a csv file in excel
body: <p>I am writing some code for a project and saving this code to .csv format.  It then will be opened in excel to further inspect the data.  There are 8 floats then 1 string in each row. How do I get excel to display each value in different cells? The code for the saving </p>
  
  <pre><code>def save_array():
      t = utctime.t()
      temp = data.get_data()
      atime = np.append([temp],[t])
      atime = ' '.join(atime)
      return atime
  
  with open( path2, 'w') as save_data:
      save_data_write = csv.writer(save_data, delimiter = ' ' , dialect = 'excel')
      save_data_write.writerow([save_array()])
  save_data.close()
  
  while i:
      time.sleep(1)
      with open( path2,'a') as save_data:
      save_data_append = csv.writer(save_data, delimiter = ' ', dialect = 'excel')
      save_data_append.writerow([save_array()])
  save_data.close()
  </code></pre>
  
  <p>The saved data in excel looks like this.</p>
  
  <pre><code>0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Apr 03 2017 20:24:59
  
  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Apr 03 2017 20:25:00
  
  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Apr 03 2017 20:25:01
  
  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Apr 03 2017 20:25:02
  
  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Apr 03 2017 20:25:03
  
  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Apr 03 2017 20:25:04
  
  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Apr 03 2017 20:25:05
  </code></pre>
  
  <p>This didn't copy very well but in excel this is all in the first cell and it also skips a line between rows.  Does anybody know how to format this correctly? </p>
  
  <p>Thanks </p>