gsheet_feeder.gworksheet
========================

.. py:module:: gsheet_feeder.gworksheet




Module Contents
---------------

.. py:class:: GWorksheet(worksheet, columns=COLUMN_NAMES, header_row=1)

   This class makes read/write operations to the a worksheet easier.
   It can read the headers from a custom row number, but the row references
   should always include the offset of the header.
   eg: if header=4, row 5 will be the first with data.


   .. py:attribute:: COLUMN_NAMES


   .. py:attribute:: wks


   .. py:attribute:: columns


   .. py:attribute:: values


   .. py:method:: col_exists(col: str)


   .. py:method:: count_rows()


   .. py:method:: get_row(row: int)


   .. py:method:: get_values()


   .. py:method:: get_cell(row, col: str, fresh=False)

      returns the cell value from (row, col),
      where row can be an index (1-based) OR list of values
      as received from self.get_row(row)
      if fresh=True, the sheet is queried again for this cell



   .. py:method:: get_cell_or_default(row, col: str, default: str = None, fresh=False, when_empty_use_default=True)

      return self.get_cell or default value on error (eg: column is missing)



   .. py:method:: set_cell(row: int, col: str, val)


   .. py:method:: batch_set_cell(cell_updates)

      receives a list of [(row:int, col:str, val)] and batch updates it, the parameters are the same as in the self.set_cell() method



   .. py:method:: to_a1(row: int, col: str)


