Skip to content

Commit

Permalink
Merge pull request #159 from nextstrain/crick-upload-update
Browse files Browse the repository at this point in the history
crick_upload: Skip "comments" sheets
  • Loading branch information
joverlee521 authored Aug 23, 2024
2 parents 96c4a39 + 0974fd8 commit 88a607d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tdb/crick_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def convert_xls_to_csv(path, fstem, ind):
exts = ['.xls', '.xlsm', '.xlsx']
workbook = xlrd.open_workbook(path+fstem + exts[ind])
for sheet in workbook.sheets():
# comments sheets are just instructions on how to use the workbook template
if sheet.name == 'comments':
print(f"Skipping sheet {sheet.name!r}", file=sys.stderr)
continue
# Replace spaces with underscores in sheet name so that the call to
# elife_upload does not error out due to the space in --fstem
sheet.name = sheet.name.replace(' ', '_')
Expand Down

0 comments on commit 88a607d

Please sign in to comment.