def store_window2   # :nodoc:
    record  = 0x023E     # Record identifier
    length  = 0x000A     # Number of bytes to follow
    grbit   = 0x0000     # Option flags
    rwTop   = 0x0000     # Top visible row
    colLeft = 0x0000     # Leftmost visible column
    rgbHdr  = 0x0000     # Row/col heading, grid color

    # The options flags that comprise grbit
    fDspFmla       = 0                      # 0 - bit
    fDspGrid       = 0                      # 1
    fDspRwCol      = 0                      # 2
    fFrozen        = 0                      # 3
    fDspZeros      = 0                      # 4
    fDefaultHdr    = 0                      # 5
    fArabic        = 0                      # 6
    fDspGuts       = 0                      # 7
    fFrozenNoSplit = 0                      # 0 - bit
    fSelected      = selected? ? 1 : 0      # 1
    fPaged         = 0                      # 2
    fBreakPreview  = 0                      # 3

    #<<< Perltidy ignore this.
    grbit             = fDspFmla
    grbit            |= fDspGrid       << 1
    grbit            |= fDspRwCol      << 2
    grbit            |= fFrozen        << 3
    grbit            |= fDspZeros      << 4
    grbit            |= fDefaultHdr    << 5
    grbit            |= fArabic        << 6
    grbit            |= fDspGuts       << 7
    grbit            |= fFrozenNoSplit << 8
    grbit            |= fSelected      << 9
    grbit            |= fPaged         << 10
    grbit            |= fBreakPreview  << 11
    #>>>

    header = [record, length].pack("vv")
    data = [grbit, rwTop, colLeft, rgbHdr].pack("vvvV")

    append(header, data)
  end
def store_window2   # :nodoc:
    record  = 0x023E     # Record identifier
    length  = 0x000A     # Number of bytes to follow
    grbit   = 0x0000     # Option flags
    rwTop   = 0x0000     # Top visible row
    colLeft = 0x0000     # Leftmost visible column
    rgbHdr  = 0x0000     # Row/col heading, grid color

    # The options flags that comprise grbit
    fDspFmla       = 0                      # 0 - bit
    fDspGrid       = 0                      # 1
    fDspRwCol      = 0                      # 2
    fFrozen        = 0                      # 3
    fDspZeros      = 0                      # 4
    fDefaultHdr    = 0                      # 5
    fArabic        = 0                      # 6
    fDspGuts       = 0                      # 7
    fFrozenNoSplit = 0                      # 0 - bit
    fSelected      = selected? ? 1 : 0      # 1
    fPaged         = 0                      # 2
    fBreakPreview  = 0                      # 3

    #<<< Perltidy ignore this.
    grbit             = fDspFmla
    grbit            |= fDspGrid       << 1
    grbit            |= fDspRwCol      << 2
    grbit            |= fFrozen        << 3
    grbit            |= fDspZeros      << 4
    grbit            |= fDefaultHdr    << 5
    grbit            |= fArabic        << 6
    grbit            |= fDspGuts       << 7
    grbit            |= fFrozenNoSplit << 8
    grbit            |= fSelected      << 9
    grbit            |= fPaged         << 10
    grbit            |= fBreakPreview  << 11
    #>>>

    header = [record, length].pack("vv")
    data = [grbit, rwTop, colLeft, rgbHdr].pack("vvvV")

    append(header, data)
  end
Write BIFF record Window2. Note, this overrides the parent Worksheet
 record because the Chart version of the record is smaller and is used
 mainly to indicate if the chart tab is selected or not.