# File lib/spreadsheet/worksheet.rb, line 164
   def store_selection(row=0, col=0, row_last=0, col_last=0)
      record = 0x001D
      length = 0x000F

      pnn     = 3
      rwAct   = row
      colAct  = col
      irefAct = 0
      cref    = 1

      rwFirst  = row
      colFirst = col

      if row_last != 0
         rwLast = row_last
      else
         rwLast = rwFirst
      end

      if col_last != 0
         colLast = col_last
      else
         colLast = colFirst
      end

      if rwFirst > rwLast
         rwFirst,rwLast = rwLast,rwFirst
      end

      if colFirst > colLast
         colFirst,colLast = colLast,colFirst
      end

      header = [record, length].pack("vv")
      fields = [pnn,rwAct,colAct,irefAct,cref,rwFirst,rwLast,colFirst,colLast]
      data   = fields.pack("CvvvvvvCC")

      append(header, data)
   end