MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
January
Sun Mon Tue Wed Thu Fri Sat
 
17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
2018
Months
JanFeb Mar
Apr May Jun
Jul Aug Sep
Oct Nov Dec


Fri, Oct 21, 2016 11:29 pm

Python script to extract a column from an Excel spreadsheet

I use the Python xlrd module to extract a column from an Excel spreadsheet. I've been using a Python script, extract-addresses.py to pull the data from a set column in an .xls spreadsheet, Directory.xls, and store it in a text file. I decided to make the script more generic, so that I can extract the data from a spreadsheet I specify when I run the script rather than a set spreadsheet and to have the specific column and output file name be variable as well. The new script is extract-column.py. The Python xlrd module will need to be installed for the script to work; xlrd can be downloaded from one of the links below:

Python Software Foundation
MoonPoint Support (version 1.0.0)

If no arguments are provided on the command line, the script will prompt for the name of the spreadsheet file from which the data should be extracted, the column number containing the data to be extracted (A is treated as column 1, B as column 2, etc.), and the name of the output file to hold the extracted data.

[ More Info ]

[/languages/python/excel] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo