-
-
Save offby1/f435a9a8cbb890d638b0 to your computer and use it in GitHub Desktop.
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
import collections | |
itemData = collections.defaultdict(list) | |
print('Reading rows...') | |
for row in range(10, 19): | |
# Each row in the spreadsheet has data for one item. | |
item = sheet['A' + str(row)].value | |
itemData['item'].append(item) | |
description = sheet['C' + str(row)].value | |
itemData['description'].append(description) | |
ordered = sheet['J' + str(row)].value | |
itemData['ordered'].append(ordered) | |
invoiced = sheet['M' + str(row)].value | |
itemData['invoiced'].append(invoiced) | |
rate = sheet['N' + str(row)].value | |
itemData['rate'].append(rate) | |
barcode = sheet['P' + str(row)].value | |
itemData['barcode'].append(barcode) | |
amount = sheet['R' + str(row)].value | |
itemData['amount'].append(amount) | |
print('{0: <16}'.format(item) + '{0: <24.20}'.format(description) + | |
'{0: <4}'.format(ordered) + '{0: <3}'.format(invoiced) + | |
'{0: <3}'.format(invoiced) + '{0: <13}'.format(barcode) + | |
'{0: <4}'.format(amount)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment