### Home Classes Methods

### In Files

- lib/spreadsheet/excel/reader/biff5.rb

### Methods

- #read_range_address_list
- #read_string

### Files

- LICENSE.txt
- Manifest.txt

### Class/Module Index

Quicksearch

- Spreadsheet
- Spreadsheet::Column
- Spreadsheet::Compatibility
- Spreadsheet::Datatypes
- Spreadsheet::Encodings
- Spreadsheet::Excel
- Spreadsheet::Excel::Error
- Spreadsheet::Excel::ExcelCompatibleWorkbook
- Spreadsheet::Excel::Internals
- Spreadsheet::Excel::Internals::Biff5
- Spreadsheet::Excel::Internals::Biff8
- Spreadsheet::Excel::Offset
- Spreadsheet::Excel::Password
- Spreadsheet::Excel::Reader
- Spreadsheet::Excel::Reader::Biff5
- Spreadsheet::Excel::Rgb
- Spreadsheet::Excel::Row
- Spreadsheet::Excel::SstEntry
- Spreadsheet::Excel::Workbook
- Spreadsheet::Excel::Worksheet
- Spreadsheet::Font
- Spreadsheet::Format
- Spreadsheet::Formula
- Spreadsheet::Helpers
- Spreadsheet::Link
- Spreadsheet::Note
- Spreadsheet::NoteObject
- Spreadsheet::ParseExcel
- Spreadsheet::ParseExcel::Worksheet
- Spreadsheet::ParseExcel::Worksheet::Cell
- Spreadsheet::Row
- Spreadsheet::Workbook
- Spreadsheet::Worksheet
- Spreadsheet::Writer

No matching classes.

# Spreadsheet::Excel::Reader::Biff5

This Module collects reader methods such as read_string that are specific to Biff5. This Module is likely to be expanded as Support for older Versions of Excel grows.

### Public Instance Methods

read_range_address_list(work, len) click to toggle source

    # File lib/spreadsheet/excel/reader/biff5.rb, line 20
    def read_range_address_list work, len
      # Cell range address, BIFF2-BIFF5:
      # Offset  Size  Contents
      # 0       2     Index to first row
      # 2       2     Index to last row
      # 4       1     Index to first column
      # 5       1     Index to last column
      #
      offset = 0, results = []
      return results if len < 2
      count = work[0..1].unpack('v').first
      offset = 2
      count.times do |i|
        results << work[offset...offset+6].unpack('v2c2')
        offset += 6
      end
      results
    end

read_string(work, count_length=1) click to toggle source

Read a String of 8-bit Characters

    # File lib/spreadsheet/excel/reader/biff5.rb, line 11
    def read_string work, count_length=1
      # Offset    Size  Contents
      #      0  1 or 2  Length of the string (character count, ln)
      # 1 or 2      ln  Character array (8-bit characters)
      fmt = count_length == 1 ? 'C' : 'v'
      length, = work.unpack fmt
      work[count_length, length]
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.