You can also just extract the values ββusing xlrd rather than returning the full Excel cell:
book = xlrd.open_workbook('example.xls') first_sheet = book.sheet_by_index(0) print first_sheet.row_values(0)
Gets the values ββof the first row in the first sheet.
You can use slices with row_values ββ(and similarly for columns). So, to get values ββfrom a whole sheet:
cells = [] for i in range(first_sheet.nrows): cells.append(first_sheet.row_values(rowx=i,start_colx=0,end_colx=None))
There may be more elegant ways to use xlrd - but it worked for me.
source share