#import the xlrd module import xlrd #open the spreadsheet file(or workbook) workbook = xlrd.open_workbook("test2.xlsx") #Open a sheet: # go into the name of the sheet-below the bottom testfan is the name testfan = workbook.sheet_by_index(0) #extra the value print("the value at row 4 and column 0 is:{0}".format(testfan.cell(4,0).value)) #the all rows of the sheet total_rows = testfan.nrows total_cols = testfan.ncols print total_cols #print the 2nd row of the sheet print testfan.row_values(1) #get slice of column =2 for row =1...6 a = testfan.col_values(3,1,6) print a #calulate the average num of those numbers a = testfan.col_values(3,1,6) len(a) k = sum(a)/len(a) print k #other way of the last record output = 0 for x in range(1,3): a = testfan.cell(x,5).value avg print a