Parsing excel columns with xlrd

This is the place for queries that don't fit in any of the other categories.

Parsing excel columns with xlrd

Postby ace10mccloud » Mon May 19, 2014 4:01 pm

I apologize if this is in the wrong area as this is my first post. I don't have any specific code written as I am new to xlrd, but my question is pretty specific. I want to be able to parse one column out of one worksheet in a workbook, and then paste that column onto an entirely knew workbook. I want this repeated several times across multiple worksheets, while appending the column to the end of the new workbook every time. I don't need a specific solution, but maybe point me to a blog or video that could teach me about parsing with xlrd.
ace10mccloud
 
Posts: 3
Joined: Mon May 19, 2014 3:27 pm

Re: Parsing excel columns with xlrd

Postby stranac » Mon May 19, 2014 4:36 pm

The package's website has documentation for both xlrd and xlwt.
Looks like there is also a pdf tutorial.

If you run into any problems, feel free to ask specific questions.
Friendship is magic!

R.I.P. Tracy M. You will be missed.
User avatar
stranac
 
Posts: 1144
Joined: Thu Feb 07, 2013 3:42 pm

Re: Parsing excel columns with xlrd

Postby ace10mccloud » Mon May 19, 2014 5:30 pm

Have you used xlrd before? I have read the documentation on that site and as someone who has never used that module before it wasn't the most clear on where to start with parsing.
ace10mccloud
 
Posts: 3
Joined: Mon May 19, 2014 3:27 pm

Re: Parsing excel columns with xlrd

Postby stranac » Mon May 19, 2014 8:05 pm

Basically, you use the xlrd.open_workbook() function to open an excel file.
You then use one of the workbook's methods to select a sheet.
Then you use the methods of the sheet to get the data you want.

The pdf tutorial has some examples, in case you still don't know what to do.
Friendship is magic!

R.I.P. Tracy M. You will be missed.
User avatar
stranac
 
Posts: 1144
Joined: Thu Feb 07, 2013 3:42 pm


Return to General Coding Help

Who is online

Users browsing this forum: Google [Bot], micseydel and 3 guests