2
我想只打印specifig列的行有條件的小區打印,比方說colmn B,到目前爲止好:的Python/Excel中 - 與xlrd
import xlrd
file_location = "/home/myuser/excel.xls"
workbook = xlrd.open_workbook(file_location)
sheet = workbook.sheet_by_index(0)
data = [[sheet.cell_value(r, c) for c in range(sheet.ncols)] for r in range(sheet.nrows)]
for r in data:
print r[1]
現在我想打印出來只有那些細胞值,它們具有黃色背景。 我發現這個link,但未能熟練使用我的代碼。有人能幫我嗎?
酷!非常感謝你! – royskatt