### Home Classes Methods

### In Files

- lib/spreadsheet/excel/sst_entry.rb

### Parent

Object

### Methods

- ::new
- #content
- #continue

### Included Modules

- Spreadsheet::Encodings

### 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::SstEntry

Shared String Table Entry

### Attributes

available[RW]
chars[RW]
continued_chars[RW]
flags[RW]
phonetic[RW]
richtext[RW]
wide[RW]

### Public Class Methods

new(opts = {}) click to toggle source

    # File lib/spreadsheet/excel/sst_entry.rb, line 11
    def initialize opts = {}
      @content = nil
      @offset = opts[:offset]
      @ole    = opts[:ole]
      @reader = opts[:reader]
      @continuations = []
    end

### Public Instance Methods

content() click to toggle source

Access the contents of this Shared String

    # File lib/spreadsheet/excel/sst_entry.rb, line 20
    def content
      @content or begin
        data = nil
        data = @ole[@offset, @available]
        content, _ = @reader.read_string_body data, @flags, @available, @wide
        @continuations.each do |offset, len|
          @reader.continue_string(@ole[offset,len], [content, @chars])
        end
        content = client content, 'UTF-16LE'
        if @reader.memoize?
          @content = content
        end
        content
      end
    end

continue(offset, size, chars) click to toggle source

Register the offset of a String continuation

    # File lib/spreadsheet/excel/sst_entry.rb, line 37
    def continue offset, size, chars
      @continued_chars -= chars
      @continuations.push [offset, size]
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.