0

I am an absolute beginner in Python programming. I have a bunch of excel files (with extension .xls) which I would like to be able to read in python. I have to extract 2 columns from a given sheet from each file and write them into a CSV file. This is data coming from some measurement results so the format of each excel file is the same. I have to create n CSV files from a given number of n excel files.

From my general search I figured I could use module xlrd. I tried downloading the module as described here. I am working on windows with python 2 and using Python GUI IDLE. When I go to the command line in windows, browse to the folder where I saved the module files and type

python setup.py build

I get an error message saying "python is not recognized as an internal or external command, operable program or batch file."

I also setup the system variable as described here but that does not help. As I read somewhere else, I use

import sys
print sys.path

which displays

['', 'C:\\Python27\\Lib\\idlelib', 'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages']

Does that mean my environment variable is correctly set up? Please help me getting started with using .xls files in Python.

Thanks.

Community
  • 1
  • 1
beeprogrammer
  • 581
  • 1
  • 7
  • 18

1 Answers1

0

Solution here proposed by M4rtini worked for me. Posting here again

If windows this should work. Browser to "folder with python"\scripts Open cmd here (shift + right click and and it should be an option in the context menu.)

type inn: easy_install.exe xlrd It should download and install if for you

Community
  • 1
  • 1
beeprogrammer
  • 581
  • 1
  • 7
  • 18