Skip to content

Commit

Permalink
gsheet: add some todos
Browse files Browse the repository at this point in the history
  • Loading branch information
Juarez Rudsatz committed Feb 20, 2022
1 parent 4939136 commit 7887357
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions petl/io/gsheet.py
Expand Up @@ -128,6 +128,7 @@ def _yield_all_rows(self, ws):
yield tuple(row)

def _yield_by_range(self, ws):
# TODO: try using: worksheet.get_values('A2:C10')
# start_cell -> top left, end_cell -> bottom right
start_cell, end_cell = self.cell_range.split(":")
from gspread.utils import a1_to_rowcol
Expand Down Expand Up @@ -184,6 +185,7 @@ def togsheet(
if worksheet:
ws.update_title(title=worksheet)
# gspread indices start at 1, therefore row index insert starts at 1
# TODO: batch insert with ws.insert_rows
for index, row in enumerate(tbl, start=1):
ws.insert_row(row, index)
# specify the user account to share to
Expand Down

0 comments on commit 7887357

Please sign in to comment.