Class OLEWriter
In: lib/spreadsheet/olewriter.rb
Parent: Object

Methods

Constants

MaxSize = 7087104   Not meant for public consumption
BlockSize = 4096
BlockDiv = 512
ListBlocks = 127

Attributes

biff_size  [R] 
big_blocks  [R] 
book_size  [R] 
list_blocks  [R] 
root_start  [R] 
size_allowed  [R] 

Public Class methods

Accept an IO or IO-like object or a filename (as a String)

Imitate IO.open behavior

Public Instance methods

Calculate various sizes needed for the OLE stream

Write root entry, big block list and close the filehandle.

Set the size of the data to be written to the OLE stream

@big_blocks = (109 depot block x (128 -1 marker word)

  • (1 x end words)) = 13842

MaxSize = @big_blocks * 512 bytes = 7087104

Delegate ‘write’ and ‘print’ to the internal IO object.

Write a big block depot

Write the OLE header block

Pad the end of the file

Write property sheet in property storage

Write property storage

[Validate]