title: How to merge .csv files into one .xls file in multiple sheets using Python?
body: <p>I use the following code for merging data from multiple .csv files into one .xls file. Using this code, all the data are saved in one sheet, but I need to save each file's data in a separate sheet, but in the same file.</p>
  
  <p>Would you help me work out how to do this please?</p>
  
  <pre><code>import glob
  import csv
  
  csvfiles=glob.glob('*.csv')
  wf=csv.writer(open('output.xls', 'wb'))
  
  for files in csvfiles:
      rd=csv.reader(open(files, 'r'))
      rd.next()
      for row in rd:
          wf.writerow(row)
  </code></pre>