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.
16 lines
367 B
16 lines
367 B
5 years ago
|
""" 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]
|