(self, first_row, first_col, last_row, last_col)
Set the selected cell or cells in a worksheet

        Args:
            first_row:    The first row of the cell range. (zero indexed).
            first_col:    The first column of the cell range.
            last_row:     The last row of the cell range. (zero indexed).
            last_col:     The last column of the cell range.

        Returns:
            0:  Nothing.
Set the selected cell or cells in a worksheet
Set the selected cell or cells in a worksheet
def set_selection(self, first_row, first_col, last_row, last_col):
        """
        Set the selected cell or cells in a worksheet

        Args:
            first_row:    The first row of the cell range. (zero indexed).
            first_col:    The first column of the cell range.
            last_row:     The last row of the cell range. (zero indexed).
            last_col:     The last column of the cell range.

        Returns:
            0:  Nothing.
        """
        pane = None

        # Range selection. Do this before swapping max/min to allow the
        # selection direction to be reversed.
        active_cell = xl_rowcol_to_cell(first_row, first_col)

        # Swap last row/col for first row/col if necessary
        if first_row > last_row:
            (first_row, last_row) = (last_row, first_row)

        if first_col > last_col:
            (first_col, last_col) = (last_col, first_col)

        # If the first and last cell are the same write a single cell.
        if (first_row == last_row) and (first_col == last_col):
            sqref = active_cell
        else:
            sqref = xl_range(first_row, first_col, last_row, last_col)

        # Selection isn't set for cell A1.
        if sqref == 'A1':
            return

        self.selections = [[pane, active_cell, sqref]]
def set_selection ( self , first_row , first_col , last_row , last_col ) : pane = None # Range selection. Do this before swapping max/min to allow the # selection direction to be reversed. active_cell = xl_rowcol_to_cell ( first_row , first_col ) # Swap last row/col for first row/col if necessary if first_row > last_row : ( first_row , last_row ) = ( last_row , first_row ) if first_col > last_col : ( first_col , last_col ) = ( last_col , first_col ) # If the first and last cell are the same write a single cell. if ( first_row == last_row ) and ( first_col == last_col ) : sqref = active_cell else : sqref = xl_range ( first_row , first_col , last_row , last_col ) # Selection isn't set for cell A1. if sqref == 'A1' : return self . selections = [ [ pane , active_cell , sqref ] ]