Skip to content

Instantly share code, notes, and snippets.

@luiscberrocal
Created August 1, 2018 18:58
Show Gist options
  • Save luiscberrocal/dddaa09fc6db9bf40a501ea3633d1c11 to your computer and use it in GitHub Desktop.
Save luiscberrocal/dddaa09fc6db9bf40a501ea3633d1c11 to your computer and use it in GitHub Desktop.
Shell to read Excel sheet using OpenPyxl
def convert(self, filename, sheet_name='Sheet1'):
wb = load_workbook(filename=filename, data_only=True)
sheet = wb[sheet_name]
row_num = 1
for row in sheet.rows:
if row_num != 1:
try:
status = row[self.columns['original_name']].value
except Exception as e:
pass
row_num += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment