""" some helper functions """ import openpyxl def get_sheet_of_file(excel_file, name=None): """ returns a sheet from an excel FileCache if name is set to None, the function returns the first sheet """ workbook = openpyxl.open(excel_file) if name is None: sheets = workbook.sheetnames name = sheets[0] return workbook[name]