Method: Spreadsheet::Excel::Reader#read_bof
- Defined in:
- lib/spreadsheet/excel/reader.rb
#read_bof ⇒ Object
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/spreadsheet/excel/reader.rb', line 165 def read_bof # Offset Size Contents # 0 2 BIFF version (always 0x0600 for BIFF8) # 2 2 Type of the following data: 0x0005 = Workbook globals # 0x0006 = Visual Basic module # 0x0010 = Worksheet # 0x0020 = Chart # 0x0040 = Macro sheet # 0x0100 = Workspace file # 4 2 Build identifier # 6 2 Build year # 8 4 File history flags # 12 4 Lowest Excel version that can read all records in this file _, @bof, _, work = get_next_chunk ## version and datatype are common to all Excel-Versions. Later versions # have additional information such as build-id and -year (from BIFF5). # These are ignored for the time being. version, datatype = work.unpack("v2") if datatype == 0x5 @version = version end end |