Reputation: 499
Open the workbook
import xlrd
wb = xlrd.open_workbook('/home/AlAhAb65/Desktop/Parameter.xls')
Check the sheet names
wb.sheet_names()
Get the first sheet either by name
sh = wb.sheet_by_name('QA_TEST')
l = []
Iterate through rows, returning each as a list that you can index:
for rownum in range(sh.nrows):
l.append(sh.row_values(rownum))
print l
When I am reading from excel to python list there always come ‘u’ before every data. How can I get rid of this? Is everything read as string? Do I have to convert every time?
Upvotes: 0
Views: 135