[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/lib/excel/ -> OLEwriter.php (summary)

(no description)

File Size: 414 lines (13 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

OLEwriter:: (11 methods):
  OLEwriter()
  _initialize()
  set_size()
  _calculate_sizes()
  close()
  write()
  write_header()
  _write_big_block_depot()
  _write_property_storage()
  _write_pps()
  _write_padding()


Class: OLEwriter  - X-Ref

Class for creating OLE streams for Excel Spreadsheets

OLEwriter($OLEfilename)   X-Ref
Class for creating an OLEwriter

param: string $OLEfilename the name of the file for the OLE stream

_initialize()   X-Ref
Check for a valid filename and store the filehandle.
Filehandle "-" writes to STDOUT


set_size($biffsize)   X-Ref
Set the size of the data to be written to the OLE stream.
The maximun size comes from this:
$big_blocks = (109 depot block x (128 -1 marker word)
- (1 x end words)) = 13842
$maxsize    = $big_blocks * 512 bytes = 7087104

param: integer $biffsize The size of the data to be written to the OLE stream
return: integer 1 for success

_calculate_sizes()   X-Ref
Calculate various sizes needed for the OLE stream


close()   X-Ref
Write root entry, big block list and close the filehandle.
This routine is used to explicitly close the open filehandle without
having to wait for DESTROY.


write($data)   X-Ref
Write BIFF data to OLE file.

param: string $data string of bytes to be written

write_header()   X-Ref
Write OLE header block.


_write_big_block_depot()   X-Ref
Write big block depot.


_write_property_storage()   X-Ref
Write property storage. TODO: add summary sheets


_write_pps($name,$type,$dir,$start,$size)   X-Ref
Write property sheet in property storage

param: string  $name  name of the property storage.
param: integer $type  type of the property storage.
param: integer $dir   dir of the property storage.
param: integer $start start of the property storage.
param: integer $size  size of the property storage.

_write_padding()   X-Ref
Pad the end of the file




Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7