Class Spreadsheet_Excel_Writer_Workbook

Description

Class for generating Excel Spreadsheets

  • author: Xavier Noguer <xnoguer@rezebra.com>
  • version: Release: 1.9.0
  • copyright: 1997-2006 The PHP Group

Located in /web/plugin/feature/sms_excel/lib/external/Spreadsheet/Excel/Writer/Workbook.php (line 50)

PEAR
   |
   --Spreadsheet_Excel_Writer_BIFFwriter
      |
      --Spreadsheet_Excel_Writer_Workbook
Direct descendents
Class Description
 class Spreadsheet_Excel_Writer Class for writing Excel Spreadsheets. This class should change COMPLETELY.
Variable Summary
 integer $_1904
 integer $_activesheet
 integer $_biffsize
 integer $_codepage
 integer $_country_code
 integer $_fileclosed
 string $_filename
 integer $_firstsheet
 array $_formats
 array $_palette
 object Parser $_parser
 integer $_selected
 string $_sheetname
 array $_sheetnames
 object Format $_tmp_format
 object Format $_url_format
 array $_worksheets
 integer $_xf_index
Method Summary
 Spreadsheet_Excel_Writer_Workbook Spreadsheet_Excel_Writer_Workbook (string $filename)
 &Spreadsheet_Excel_Writer_Format &addFormat ([array $properties = array()])
 &Spreadsheet_Excel_Writer_Validator &addValidator ()
 mixed &addWorksheet ([string $name = ''])
 mixed close ()
 void setCountry (integer $code)
 integer setCustomColor (integer $index, integer $red, integer $green, integer $blue)
 void setVersion (integer $version)
 array sheets ()
 array worksheets ()
Variables
integer $_1904 (line 68)

Flag for 1904 date system (0 => base date is 1900, 1 => base date is 1904)

integer $_activesheet (line 74)

The active worksheet of the workbook (0 indexed)

integer $_biffsize (line 106)

The BIFF file size for the workbook.

  • see: _calcSheetOffsets()
integer $_codepage (line 154)

The codepage indicates the text encoding used for strings

integer $_country_code (line 160)

The country code used for localization

integer $_fileclosed (line 99)

Flag for preventing close from being called twice.

string $_filename (line 56)

Filename for the Workbook

integer $_firstsheet (line 80)

1st displayed worksheet in the workbook (0 indexed)

array $_formats (line 136)

Array containing references to all of this workbook's formats

array $_palette (line 142)

Array containing the colour palette

object Parser $_parser (line 62)

Formula parser

integer $_selected (line 86)

Number of workbook tabs selected

string $_sheetname (line 112)

The default sheetname for all sheets created.

array $_sheetnames (line 130)

Array of sheetnames for creating the EXTERNSHEET records

integer $_string_sizeinfo_size (line 166)

number of bytes for sizeinfo of strings

object Format $_tmp_format (line 118)

The default XF format.

object Format $_url_format (line 148)

The default format for URLs.

array $_worksheets (line 124)

Array containing references to all of this workbook's worksheets

integer $_xf_index (line 92)

Index for creating adding new formats to the workbook

Inherited Variables

Inherited from Spreadsheet_Excel_Writer_BIFFwriter

Spreadsheet_Excel_Writer_BIFFwriter::$_BIFF_version
Spreadsheet_Excel_Writer_BIFFwriter::$_byte_order
Spreadsheet_Excel_Writer_BIFFwriter::$_data
Spreadsheet_Excel_Writer_BIFFwriter::$_datasize
Spreadsheet_Excel_Writer_BIFFwriter::$_limit
Spreadsheet_Excel_Writer_BIFFwriter::$_tmp_dir
Methods
Constructor Spreadsheet_Excel_Writer_Workbook (line 174)

Class constructor

  • access: public
Spreadsheet_Excel_Writer_Workbook Spreadsheet_Excel_Writer_Workbook (string $filename)
  • string $filename: filename for storing the workbook. "-" for writing to stdout.
addFormat (line 356)

Add a new format to the Excel workbook.

Also, pass any properties to the Format constructor.

  • return: reference to an Excel Format
  • access: public
&Spreadsheet_Excel_Writer_Format &addFormat ([array $properties = array()])
  • array $properties: array with properties for initializing the format.
addValidator (line 370)

Create new validator.

  • return: reference to a Validator
  • access: public
&Spreadsheet_Excel_Writer_Validator &addValidator ()
addWorksheet (line 310)

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..].

  • return: reference to a worksheet object on success, PEAR_Error on failure
  • access: public
mixed &addWorksheet ([string $name = ''])
  • string $name: the optional name of the worksheet
close (line 213)

Calls finalization methods.

This method should always be the last one to be called on every workbook

  • return: true on success. PEAR_Error on failure
  • access: public
mixed close ()
setCountry (line 295)

Set the country identifier for the workbook

  • access: public
void setCountry (integer $code)
  • integer $code: Is the international calling country code for the chosen country.
setCustomColor (line 388)

Change the RGB components of the elements in the colour palette.

  • return: The palette index for the custom color
  • access: public
integer setCustomColor (integer $index, integer $red, integer $green, integer $blue)
  • integer $index: colour index
  • integer $red: red RGB value [0-255]
  • integer $green: green RGB value [0-255]
  • integer $blue: blue RGB value [0-255]
setVersion (line 262)

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.

  • access: public
void setVersion (integer $version)
  • integer $version: The BIFF version
sheets (line 235)

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

array sheets ()
worksheets (line 247)

An accessor for the _worksheets[] array.

Returns an array of the worksheet objects in a workbook

  • access: public
array worksheets ()

Inherited Methods

Inherited From Spreadsheet_Excel_Writer_BIFFwriter

 Spreadsheet_Excel_Writer_BIFFwriter::Spreadsheet_Excel_Writer_BIFFwriter()
 Spreadsheet_Excel_Writer_BIFFwriter::setTempDir()

Inherited From PEAR

 PEAR::PEAR()
 PEAR::delExpect()
 PEAR::expectError()
 PEAR::getStaticProperty()
 PEAR::isError()
 PEAR::loadExtension()
 PEAR::popErrorHandling()
 PEAR::popExpect()
 PEAR::pushErrorHandling()
 PEAR::raiseError()
 PEAR::registerShutdownFunc()
 PEAR::setErrorHandling()
 PEAR::staticPopErrorHandling()
 PEAR::staticPushErrorHandling()
 PEAR::throwError()
 PEAR::_PEAR()

Documentation generated on Wed, 09 Feb 2011 09:05:19 +0700 by phpDocumentor 1.4.2