def store_panes(y=0, x=0, rwtop=nil,  colleft=nil, no_split=nil, pnnAct=nil)   #:nodoc:
    record      = 0x0041       # Record identifier
    length      = 0x000A       # Number of bytes to follow

    # Code specific to frozen or thawed panes.
    if frozen?
      # Set default values for $rwTop and $colLeft
      rwtop   = y unless rwtop
      colleft = x unless colleft
    else
      # Set default values for $rwTop and $colLeft
      rwtop   = 0  unless rwtop
      colleft = 0  unless colleft

      # Convert Excel's row and column units to the internal units.
      # The default row height is 12.75
      # The default column width is 8.43
      # The following slope and intersection values were interpolated.
      #
      y = 20*y      + 255
      x = 113.879*x + 390
    end


    # Determine which pane should be active. There is also the undocumented
    # option to override this should it be necessary: may be removed later.
    #
    unless pnnAct
      pnnAct = 0 if (x != 0 && y != 0) # Bottom right
      pnnAct = 1 if (x != 0 && y == 0) # Top right
      pnnAct = 2 if (x == 0 && y != 0) # Bottom left
      pnnAct = 3 if (x == 0 && y == 0) # Top left
    end

    @active_pane = pnnAct # Used in store_selection

    store_simple(record, length, x, y, rwtop, colleft, pnnAct)
  end
def store_panes(y=0, x=0, rwtop=nil,  colleft=nil, no_split=nil, pnnAct=nil)   #:nodoc:
    record      = 0x0041       # Record identifier
    length      = 0x000A       # Number of bytes to follow

    # Code specific to frozen or thawed panes.
    if frozen?
      # Set default values for $rwTop and $colLeft
      rwtop   = y unless rwtop
      colleft = x unless colleft
    else
      # Set default values for $rwTop and $colLeft
      rwtop   = 0  unless rwtop
      colleft = 0  unless colleft

      # Convert Excel's row and column units to the internal units.
      # The default row height is 12.75
      # The default column width is 8.43
      # The following slope and intersection values were interpolated.
      #
      y = 20*y      + 255
      x = 113.879*x + 390
    end


    # Determine which pane should be active. There is also the undocumented
    # option to override this should it be necessary: may be removed later.
    #
    unless pnnAct
      pnnAct = 0 if (x != 0 && y != 0) # Bottom right
      pnnAct = 1 if (x != 0 && y == 0) # Top right
      pnnAct = 2 if (x == 0 && y != 0) # Bottom left
      pnnAct = 3 if (x == 0 && y == 0) # Top left
    end

    @active_pane = pnnAct # Used in store_selection

    store_simple(record, length, x, y, rwtop, colleft, pnnAct)
  end
y           = args[0] || 0   # Vertical split position
    x           = $_[1] || 0;   # Horizontal split position
    rwTop       = $_[2];        # Top row visible
    my $colLeft     = $_[3];        # Leftmost column visible
    my $no_split    = $_[4];        # No used here.
    my $pnnAct      = $_[5];        # Active pane


 Writes the Excel BIFF PANE record.
 The panes can either be frozen or thawed (unfrozen).
 Frozen panes are specified in terms of a integer number of rows and columns.
 Thawed panes are specified in terms of Excel's units for rows and columns.