Class: ExternSheetRecord

Inherits:
BiffRecord show all
Defined in:
lib/surpass/biff_record.rb

Overview

In BIFF8 the record stores a list with indexes to SUPBOOK records (list of REF structures, 6.100). See 5.10.3 for details about external references in BIFF8.

Record EXTERNSHEET, BIFF8: Offset Size Contents

0             2        Number of following REF structures (nm)
2           6nm        List of nm REF structures. Each REF contains the following data:
                       Offset     Size     Contents
                          0         2      Index to SUPBOOK record
                          2         2      Index to first SUPBOOK sheet
                          4         2      Index to last SUPBOOK sheet

Constant Summary collapse

RECORD_ID =
0x0017

Constants inherited from BiffRecord

BiffRecord::BIFF_LIMIT, BiffRecord::CONTINUE_RECORD_ID

Instance Attribute Summary

Attributes inherited from BiffRecord

#record_data

Instance Method Summary collapse

Methods inherited from BiffRecord

#record_header, #to_biff

Constructor Details

#initialize(refs = []) ⇒ ExternSheetRecord

Returns a new instance of ExternSheetRecord.



2144
2145
2146
2147
2148
2149
2150
# File 'lib/surpass/biff_record.rb', line 2144

def initialize(refs = [])
  # do we always need this ref? or only if there are no refs?
  # AN: I am assuming only needed if no other refs TODO test
  refs = [[0,0,0]] if refs.empty?
  ref_data = refs.collect {|r| r.pack('v3')}.join
  @record_data = [refs.length].pack('v') + ref_data
end