def set_selection(*args)
      return if args.empty?

      row_first, col_first, row_last, col_last = row_col_notation(args)
      active_cell = xl_rowcol_to_cell(row_first, col_first)

      if row_last  # Range selection.
        # Swap last row/col for first row/col as necessary
        row_first, row_last = row_last, row_first if row_first > row_last
        col_first, col_last = col_last, col_first if col_first > col_last

        # If the first and last cell are the same write a single cell.
        if row_first == row_last && col_first == col_last
          sqref = active_cell
        else
          sqref = xl_range(row_first, row_last, col_first, col_last)
        end
      else          # Single cell selection.
        sqref = active_cell
      end

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

      @selections = [ [ nil, active_cell, sqref ] ]
    end
def set_selection(*args)
      return if args.empty?

      row_first, col_first, row_last, col_last = row_col_notation(args)
      active_cell = xl_rowcol_to_cell(row_first, col_first)

      if row_last  # Range selection.
        # Swap last row/col for first row/col as necessary
        row_first, row_last = row_last, row_first if row_first > row_last
        col_first, col_last = col_last, col_first if col_first > col_last

        # If the first and last cell are the same write a single cell.
        if row_first == row_last && col_first == col_last
          sqref = active_cell
        else
          sqref = xl_range(row_first, row_last, col_first, col_last)
        end
      else          # Single cell selection.
        sqref = active_cell
      end

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

      @selections = [ [ nil, active_cell, sqref ] ]
    end
:call-seq:
   set_selection(cell_or_cell_range)

 Set which cell or cells are selected in a worksheet.

 This method can be used to specify which cell or cells are selected
 in a worksheet. The most common requirement is to select a single cell,
 in which case +last_row+ and +last_col+ can be omitted. The active cell
 within a selected range is determined by the order in which +first+ and
 +last+ are specified. It is also possible to specify a cell or a range
 using A1 notation. See the note about
 {"Cell notation"}[#label-Cell+notation].

 Examples:

     worksheet1.set_selection(3, 3)          # 1. Cell D4.
     worksheet2.set_selection(3, 3, 6, 6)    # 2. Cells D4 to G7.
     worksheet3.set_selection(6, 6, 3, 3)    # 3. Cells G7 to D4.
     worksheet4.set_selection('D4')          # Same as 1.
     worksheet5.set_selection('D4:G7')       # Same as 2.
     worksheet6.set_selection('G7:D4')       # Same as 3.

 The default cell selections is (0, 0), 'A1'.