Last active
July 19, 2017 04:01
-
-
Save edwardinubuntu/da97995eca081050a33391e6898c3cd6 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
logging.debug('sheet_id: ' + str(sheet_id)) | |
logging.debug('row.id: ' + str(eachUpdate['row.id'])) | |
# Find the row by id | |
row_to_update = self.smart_sheet_authorized.Sheets.get_row(sheet_id, int(eachUpdate['row.id'])) | |
# Check the update from GS is in SS Columns | |
if eachUpdate['column'] in column_map: | |
# Get the SS column id from columns map | |
smart_sheet_column = column_map[eachUpdate['column']] | |
# Get cell whict want to update | |
cell_to_update = row_to_update.get_column(smart_sheet_column) | |
# Update Value | |
cell_to_update.value = eachUpdate['value'] | |
# Put column back to row | |
row_to_update.set_column(cell_to_update.column_id, cell_to_update) | |
# Update row | |
self.smart_sheet_authorized.Sheets.update_rows(sheet_id, [row_to_update]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment