title: Converting xls file into csv/txt file in Python
body: <p>I'm Using Python 2.7.3
  How can i convert excel file(.xls) to txt/.csv file</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  x = []
  y = []
  t = []
  
  fig = plt.figure()
  rect = fig.patch
  rect.set_facecolor('#31312e')
  
  readFile = open('data.csv', 'r')
  sepFile = readFile.read().split('\n')
  readFile.close()
  
  for idx, plotPair in enumerate(sepFile):
      if plotPair in '. ':
         # skip. or space
         continue
      if idx &gt; 1:  # to skip the first line
          xAndY = plotPair.split(',')
          time_string = xAndY[0]
          t.append(time_string)
          y.append(float(xAndY[1]))
  
  ax1 = fig.add_subplot(1, 1, 1, axisbg='blue')
  ax1.plot(t, y, 'c', linewidth=3.3)
  
  plt.title('IRRADIANCE')
  plt.xlabel('TIME')
  
  plt.show()
  </code></pre>
  
  <p>sample of my txt file:</p>
  
  <p>TimeStamp,Irradiance
  21/7/2014 0:00,0.66
  21/7/2014 0:00,0.71
  21/7/2014 0:00,0.65
  21/7/2014 0:00,0.67
  21/7/2014 0:01,0.58</p>