Created
August 1, 2018 18:58
-
-
Save luiscberrocal/dddaa09fc6db9bf40a501ea3633d1c11 to your computer and use it in GitHub Desktop.
Shell to read Excel sheet using OpenPyxl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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