| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 954 lines (36 kb) |
| Included or required: | 1 time |
| Referenced: | 0 times |
| Includes or requires: | 3 files lib/excel/BIFFwriter.php lib/excel/OLEwriter.php lib/excel/Format.php |
Workbook:: (29 methods):
Workbook()
close()
sheets()
worksheets()
add_worksheet()
addworksheet()
add_format()
addformat()
set_custom_color()
_set_palette_xl97()
store_workbook()
_store_OLE_file()
_calc_sheet_offsets()
_store_all_fonts()
_store_all_num_formats()
_store_all_xfs()
_store_all_styles()
_store_externs()
_store_names()
_store_window1()
_store_boundsheet()
_store_style()
_store_num_format()
_store_1904()
_store_externcount()
_store_externsheet()
store_name_short()
store_name_long()
_store_palette()
| Workbook($filename) X-Ref |
| Class constructor param: string filename for storing the workbook. "-" for writing to stdout. |
| close() X-Ref |
| Calls finalization methods and explicitly close the OLEwriter file handle. |
| sheets() X-Ref |
| An accessor for the _worksheets[] array Returns an array of the worksheet objects in a workbook return: array |
| worksheets() X-Ref |
| An accessor for the _worksheets[] array. return: array |
| add_worksheet($name = '') X-Ref |
| Add a new worksheet to the Excel workbook. TODO: Add accessor for $this->{_sheetname} for international Excel versions. param: string $name the optional name of the worksheet return: &object reference to a worksheet object |
| addworksheet($name = '') X-Ref |
| DEPRECATED!! Use add_worksheet instead param: string $name the optional name of the worksheet return: &object reference to a worksheet object |
| add_format($properties = array() X-Ref |
| Add a new format to the Excel workbook. This adds an XF record and a FONT record. Also, pass any properties to the Format constructor. param: array $properties array with properties for initializing the format (see Format.php) return: &object reference to an XF format |
| addformat($properties = array() X-Ref |
| DEPRECATED!! Use add_format instead param: array $properties array with properties for initializing the format (see Format.php) return: &object reference to an XF format |
| set_custom_color($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 |
| _set_palette_xl97() X-Ref |
| Sets the colour palette to the Excel 97+ default. |
| store_workbook() X-Ref |
| Assemble worksheets into a workbook and send the BIFF data to an OLE storage. |
| _store_OLE_file() X-Ref |
| Store the workbook in an OLE container if the total size of the workbook data is less than ~ 7MB. |
| _calc_sheet_offsets() X-Ref |
| Calculate offsets for Worksheet BOF records. |
| _store_all_fonts() X-Ref |
| Store the Excel FONT records. |
| _store_all_num_formats() X-Ref |
| Store user defined numerical formats i.e. FORMAT records |
| _store_all_xfs() X-Ref |
| Write all XF records. |
| _store_all_styles() X-Ref |
| Write all STYLE records. |
| _store_externs() X-Ref |
| Write the EXTERNCOUNT and EXTERNSHEET records. These are used as indexes for the NAME records. |
| _store_names() X-Ref |
| Write the NAME record to define the print area and the repeat rows and cols. |
| _store_window1() X-Ref |
| Write Excel BIFF WINDOW1 record. |
| _store_boundsheet($sheetname,$offset) X-Ref |
| Writes Excel BIFF BOUNDSHEET record. param: string $sheetname Worksheet name param: integer $offset Location of worksheet BOF |
| _store_style() X-Ref |
| Write Excel BIFF STYLE records. |
| _store_num_format($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 |
| _store_1904() X-Ref |
| Write Excel 1904 record to indicate the date system in use. |
| _store_externcount($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 |
| _store_externsheet($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 |
| store_name_short($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 |
| store_name_long($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 share a lot of code with _store_name_short() 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 |
| _store_palette() X-Ref |
| Stores the PALETTE biff record. |
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |