Holger Frey
5 years ago
5 changed files with 55 additions and 0 deletions
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
""" 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] |
Loading…
Reference in new issue