You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
367 B
15 lines
367 B
""" 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]
|
|
|