Method: Spreadsheet::Excel::Writer::Workbook#write_bof

Defined in:
lib/spreadsheet/excel/writer/workbook.rb

#write_bof(workbook, writer, type) ⇒ Object



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/spreadsheet/excel/writer/workbook.rb', line 129

def write_bof workbook, writer, type
  data = [
    @biff_version,    # BIFF version (always 0x0600 for BIFF8)
    @bof_types[type], # Type of the following data:
    # 0x0005 = Workbook globals
    # 0x0006 = Visual Basic module
    # 0x0010 = Worksheet
    # 0x0020 = Chart
    # 0x0040 = Macro sheet
    # 0x0100 = Workspace file
    @build_id,        # Build identifier
    @build_year,      # Build year
    0x000,            # File history flags
    0x006            # Lowest Excel version that can read
    # all records in this file
  ]
  write_op writer, @bof, data.pack("v4V2")
end