def store_selection(first_row=0, first_col=0, last_row = nil, last_col =nil)   #:nodoc:
    record   = 0x001D                  # Record identifier
    length   = 0x000F                  # Number of bytes to follow

    pane_position = @active_pane       # Pane position
    row_active    = first_row          # Active row
    col_active    = first_col          # Active column
    irefAct  = 0                       # Active cell ref
    cref     = 1                       # Number of refs

    row_first = first_row              # First row in reference
    col_first = first_col              # First col in reference
    row_last  = last_row || row_first  # Last  row in reference
    col_last  = last_col || col_first  # Last  col in reference

    # 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

    header = [record, length].pack('vv')
    data = [pane_position, row_active, col_active, irefAct, cref,
      row_first, row_last, col_first, col_last].pack('CvvvvvvCC')

    append(header, data)
  end
def store_selection(first_row=0, first_col=0, last_row = nil, last_col =nil)   #:nodoc:
    record   = 0x001D                  # Record identifier
    length   = 0x000F                  # Number of bytes to follow

    pane_position = @active_pane       # Pane position
    row_active    = first_row          # Active row
    col_active    = first_col          # Active column
    irefAct  = 0                       # Active cell ref
    cref     = 1                       # Number of refs

    row_first = first_row              # First row in reference
    col_first = first_col              # First col in reference
    row_last  = last_row || row_first  # Last  row in reference
    col_last  = last_col || col_first  # Last  col in reference

    # 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

    header = [record, length].pack('vv')
    data = [pane_position, row_active, col_active, irefAct, cref,
      row_first, row_last, col_first, col_last].pack('CvvvvvvCC')

    append(header, data)
  end
Write BIFF record SELECTION.