I want to get particular cell values from excelsheet in my python script.
I came across xlrd
, xlwt
, xlutils
modules for reading/writing to/from excelsheet.
I created myfile.xls with hi, hello, how in first column's 3 cells.
sample code :-
import xlrd
workbook = xlrd.open_workbook('myfile.xls')
worksheet = workbook.sheet_by_name('Sheet1')
num_rows = worksheet.nrows - 1
curr_row = -1
while curr_row < num_rows:
curr_row += 1
row = worksheet.row(curr_row)
print row
output :-
[text:u'hi']
[text:u'hello']
[text:u'how']
I want to read specific cell values from excelsheet, can someone suggest me if there is a way to do that?