class 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