[ Index ]

PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09)

title

Body

[close]

/include/inc_ext/PEAR/Spreadsheet/Excel/Writer/ -> Workbook.php (summary)

(no description)

File Size: 1528 lines (54 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Spreadsheet_Excel_Writer_Workbook:: (37 methods):
  Spreadsheet_Excel_Writer_Workbook()
  close()
  sheets()
  worksheets()
  setVersion()
  setCountry()
  addWorksheet()
  addFormat()
  addValidator()
  setCustomColor()
  _setPaletteXl97()
  _storeWorkbook()
  setTempDir()
  _storeOLEFile()
  _calcSheetOffsets()
  _storeAllFonts()
  _storeAllNumFormats()
  _storeAllXfs()
  _storeAllStyles()
  _storeExterns()
  _storeNames()
  _storeCodepage()
  _storeWindow1()
  _storeBoundsheet()
  _storeSupbookInternal()
  _storeExternsheetBiff8()
  _storeStyle()
  _storeNumFormat()
  _storeDatemode()
  _storeExterncount()
  _storeExternsheet()
  _storeNameShort()
  _storeNameLong()
  _storeCountry()
  _storePalette()
  _calculateSharedStringsSizes()
  _storeSharedStringsTable()


Class: Spreadsheet_Excel_Writer_Workbook  - X-Ref

Class for generating Excel Spreadsheets

Spreadsheet_Excel_Writer_Workbook($filename)   X-Ref
Class constructor

param: string filename for storing the workbook. "-" for writing to stdout.

close()   X-Ref
Calls finalization methods.
This method should always be the last one to be called on every workbook

return: mixed true on success. PEAR_Error on failure

sheets()   X-Ref
An accessor for the _worksheets[] array
Returns an array of the worksheet objects in a workbook
It actually calls to worksheets()

return: array

worksheets()   X-Ref
An accessor for the _worksheets[] array.
Returns an array of the worksheet objects in a workbook

return: array

setVersion($version)   X-Ref
Sets the BIFF version.
This method exists just to access experimental functionality
from BIFF8. It will be deprecated !
Only possible value is 8 (Excel 97/2000).
For any other value it fails silently.

param: integer $version The BIFF version

setCountry($code)   X-Ref
Set the country identifier for the workbook

param: integer $code Is the international calling country code for the

addWorksheet($name = '')   X-Ref
Add a new worksheet to the Excel workbook.
If no name is given the name of the worksheet will be Sheeti$i, with
$i in [1..].

param: string $name the optional name of the worksheet
return: mixed reference to a worksheet object on success, PEAR_Error

addFormat($properties = array()   X-Ref
Add a new format to the Excel workbook.
Also, pass any properties to the Format constructor.

param: array $properties array with properties for initializing the format.
return: &Spreadsheet_Excel_Writer_Format reference to an Excel Format

addValidator()   X-Ref
Create new validator.

return: &Spreadsheet_Excel_Writer_Validator reference to a Validator

setCustomColor($index, $red, $green, $blue)   X-Ref
Change the RGB components of the elements in the colour palette.

param: integer $index colour index
param: integer $red   red RGB value [0-255]
param: integer $green green RGB value [0-255]
param: integer $blue  blue RGB value [0-255]
return: integer The palette index for the custom color

_setPaletteXl97()   X-Ref
Sets the colour palette to the Excel 97+ default.


_storeWorkbook()   X-Ref
Assemble worksheets into a workbook and send the BIFF data to an OLE
storage.

return: mixed true on success. PEAR_Error on failure

setTempDir($dir)   X-Ref
Sets the temp dir used for storing the OLE file

param: string $dir The dir to be used as temp dir
return: true if given dir is valid, false otherwise

_storeOLEFile()   X-Ref
Store the workbook in an OLE container

return: mixed true on success. PEAR_Error on failure

_calcSheetOffsets()   X-Ref
Calculate offsets for Worksheet BOF records.


_storeAllFonts()   X-Ref
Store the Excel FONT records.


_storeAllNumFormats()   X-Ref
Store user defined numerical formats i.e. FORMAT records


_storeAllXfs()   X-Ref
Write all XF records.


_storeAllStyles()   X-Ref
Write all STYLE records.


_storeExterns()   X-Ref
Write the EXTERNCOUNT and EXTERNSHEET records. These are used as indexes for
the NAME records.


_storeNames()   X-Ref
Write the NAME record to define the print area and the repeat rows and cols.


_storeCodepage()   X-Ref
Stores the CODEPAGE biff record.


_storeWindow1()   X-Ref
Write Excel BIFF WINDOW1 record.


_storeBoundsheet($sheetname,$offset)   X-Ref
Writes Excel BIFF BOUNDSHEET record.
FIXME: inconsistent with BIFF documentation

param: string  $sheetname Worksheet name
param: integer $offset    Location of worksheet BOF

_storeSupbookInternal()   X-Ref
Write Internal SUPBOOK record


_storeExternsheetBiff8()   X-Ref
Writes the Excel BIFF EXTERNSHEET record. These references are used by
formulas.

param: string $sheetname Worksheet name

_storeStyle()   X-Ref
Write Excel BIFF STYLE records.


_storeNumFormat($format, $ifmt)   X-Ref
Writes Excel FORMAT record for non "built-in" numerical formats.

param: string  $format Custom format string
param: integer $ifmt   Format index code

_storeDatemode()   X-Ref
Write DATEMODE record to indicate the date system in use (1904 or 1900).


_storeExterncount($cxals)   X-Ref
Write BIFF record EXTERNCOUNT to indicate the number of external sheet
references in the workbook.

Excel only stores references to external sheets that are used in NAME.
The workbook NAME record is required to define the print area and the repeat
rows and columns.

A similar method is used in Worksheet.php for a slightly different purpose.

param: integer $cxals Number of external references

_storeExternsheet($sheetname)   X-Ref
Writes the Excel BIFF EXTERNSHEET record. These references are used by
formulas. NAME record is required to define the print area and the repeat
rows and columns.

A similar method is used in Worksheet.php for a slightly different purpose.

param: string $sheetname Worksheet name

_storeNameShort($index, $type, $rowmin, $rowmax, $colmin, $colmax)   X-Ref
Store the NAME record in the short format that is used for storing the print
area, repeat rows only and repeat columns only.

param: integer $index  Sheet index
param: integer $type   Built-in name type
param: integer $rowmin Start row
param: integer $rowmax End row
param: integer $colmin Start colum
param: integer $colmax End column

_storeNameLong($index, $type, $rowmin, $rowmax, $colmin, $colmax)   X-Ref
Store the NAME record in the long format that is used for storing the repeat
rows and columns when both are specified. This shares a lot of code with
_storeNameShort() but we use a separate method to keep the code clean.
Code abstraction for reuse can be carried too far, and I should know. ;-)

param: integer $index Sheet index
param: integer $type  Built-in name type
param: integer $rowmin Start row
param: integer $rowmax End row
param: integer $colmin Start colum
param: integer $colmax End column

_storeCountry()   X-Ref
Stores the COUNTRY record for localization


_storePalette()   X-Ref
Stores the PALETTE biff record.


_calculateSharedStringsSizes()   X-Ref
Calculate
Handling of the SST continue blocks is complicated by the need to include an
additional continuation byte depending on whether the string is split between
blocks or whether it starts at the beginning of the block. (There are also
additional complications that will arise later when/if Rich Strings are
supported).


_storeSharedStringsTable()   X-Ref
Write all of the workbooks strings into an indexed array.
See the comments in _calculate_shared_string_sizes() for more information.

The Excel documentation says that the SST record should be followed by an
EXTSST record. The EXTSST record is a hash table that is used to optimise
access to SST. However, despite the documentation it doesn't seem to be
required so we will ignore it.




Generated: Wed Dec 30 05:55:15 2009 Cross-referenced by PHPXref 0.7