import xlrd

def getexceldata(filename):
    rows = []
    # open the specified Excel spreadsheet as workbook
    book = xlrd.open_workbook(filename)
    # get the first sheet
    sheet = book.sheet_by_index(0)

    # iterate through the sheet and get data from rows in list
    for row_idx in range(0, sheet.nrows):
        rows.append(list(sheet.row_values(row_idx, 0, sheet.ncols)))
    return rows


