Skip to content

Commit

Permalink
support for old tab
Browse files Browse the repository at this point in the history
  • Loading branch information
bedroesb committed Jan 13, 2022
1 parent 57229fe commit 652bee7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ena_upload/ena_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,12 @@ def main():
schema_tables = {}

for schema in SCHEMA_TYPES:
xl_sheet = xl_workbook.parse(schema, header=0)
if schema in xl_workbook.book.sheetnames:
xl_sheet = xl_workbook.parse(schema, header=0)
elif f"ENA_{schema}" in xl_workbook.book.sheetnames:
xl_sheet = xl_workbook.parse(f"ENA_{schema}", header=0)
else:
sys.exit(f"The sheet '{schema}' is not present in the excel sheet {xlsx}")
xl_sheet = xl_sheet.drop(0).dropna(how='all')
for column_name in list(xl_sheet.columns.values):
if 'date' in column_name:
Expand Down

0 comments on commit 652bee7

Please sign in to comment.