i want read data in 1 column in excel, here code:
import xlrd file_location = "location/file_name.xlsx" workbook = xlrd.open_workbook(file_location) sheet = workbook.sheet_by_name('sheet') x = [] cell in sheet.col[9]: if isinstance(cell, float): x.append(cell) print(x)
it wrong because there no method in sheet called col[col.num], want extract data column 8 (column h), can do?
you can values of 8th column this:
for rownum in range(sheet.nrows): x.append(sheet.cell(rownum, 7))
Comments
Post a Comment