|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| Workbook ($filename) | |
| close () | |
| sheets () | |
| worksheets () | |
| & | add_worksheet ($name= '') |
| & | addworksheet ($name= '') |
| & | add_format ($properties=array()) |
| & | addformat ($properties=array()) |
| set_custom_color ($index, $red, $green, $blue) | |
| _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 ($sheetname, $offset) | |
| _store_style () | |
| _store_num_format ($format, $ifmt) | |
| _store_1904 () | |
| _store_externcount ($cxals) | |
| _store_externsheet ($sheetname) | |
| store_name_short ($index, $type, $rowmin, $rowmax, $colmin, $colmax) | |
| store_name_long ($index, $type, $rowmin, $rowmax, $colmin, $colmax) | |
| _store_palette () | |
Definition at line 47 of file Workbook.php.
Calculate offsets for Worksheet BOF records.
Definition at line 395 of file Workbook.php.


Sets the colour palette to the Excel 97+ default.
Definition at line 244 of file Workbook.php.

| _store_1904 | ( | ) |
Write Excel 1904 record to indicate the date system in use.
Definition at line 724 of file Workbook.php.

| _store_all_fonts | ( | ) |
Store the Excel FONT records.
Definition at line 414 of file Workbook.php.

Store user defined numerical formats i.e. FORMAT records
Definition at line 456 of file Workbook.php.


Write all STYLE records.
Definition at line 533 of file Workbook.php.


| _store_all_xfs | ( | ) |
Write all XF records.
Definition at line 507 of file Workbook.php.

| _store_boundsheet | ( | $ | sheetname, |
| $ | offset | ||
| ) |
Writes Excel BIFF BOUNDSHEET record.
| string | $sheetname | Worksheet name |
| integer | $offset | Location of worksheet BOF |
Definition at line 672 of file Workbook.php.

| _store_externcount | ( | $ | cxals | ) |
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.
| integer | $cxals | Number of external references |
Definition at line 749 of file Workbook.php.

| _store_externs | ( | ) |
Write the EXTERNCOUNT and EXTERNSHEET records. These are used as indexes for the NAME records.
Definition at line 542 of file Workbook.php.


| _store_externsheet | ( | $ | sheetname | ) |
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.
| string | $sheetname | Worksheet name |
Definition at line 769 of file Workbook.php.

| _store_names | ( | ) |
Write the NAME record to define the print area and the repeat rows and cols.
Definition at line 556 of file Workbook.php.


| _store_num_format | ( | $ | format, |
| $ | ifmt | ||
| ) |
Writes Excel FORMAT record for non "built-in" numerical formats.
| string | $format | Custom format string |
| integer | $ifmt | Format index code |
Definition at line 709 of file Workbook.php.

| _store_OLE_file | ( | ) |
Store the workbook in an OLE container if the total size of the workbook data is less than ~ 7MB.
Definition at line 374 of file Workbook.php.


| _store_palette | ( | ) |
Stores the PALETTE biff record.
Definition at line 933 of file Workbook.php.

| _store_style | ( | ) |
Write Excel BIFF STYLE records.
Definition at line 688 of file Workbook.php.

| _store_window1 | ( | ) |
Write Excel BIFF WINDOW1 record.
Definition at line 641 of file Workbook.php.

| & add_format | ( | $ | properties = array() | ) |
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.
public
| array | $properties | array with properties for initializing the format (see Format.php) |
Definition at line 182 of file Workbook.php.

| & add_worksheet | ( | $ | name = '' | ) |
Add a new worksheet to the Excel workbook. TODO: Add accessor for $this->{_sheetname} for international Excel versions.
public
| string | $name | the optional name of the worksheet |
Definition at line 130 of file Workbook.php.


DEPRECATED!! Use add_format instead
public
| array | $properties | array with properties for initializing the format (see Format.php) |
Definition at line 198 of file Workbook.php.

| & addworksheet | ( | $ | name = '' | ) |
DEPRECATED!! Use add_worksheet instead
public
| string | $name | the optional name of the worksheet |
Definition at line 169 of file Workbook.php.

| close | ( | ) |
Calls finalization methods and explicitly close the OLEwriter file handle.
Definition at line 91 of file Workbook.php.

| set_custom_color | ( | $ | index, |
| $ | red, | ||
| $ | green, | ||
| $ | blue | ||
| ) |
Change the RGB components of the elements in the colour palette.
public
| 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] |
Definition at line 214 of file Workbook.php.
| sheets | ( | ) |
An accessor for the _worksheets[] array Returns an array of the worksheet objects in a workbook
Definition at line 107 of file Workbook.php.

| store_name_long | ( | $ | index, |
| $ | type, | ||
| $ | rowmin, | ||
| $ | rowmax, | ||
| $ | colmin, | ||
| $ | colmax | ||
| ) |
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. ;-)
| integer | $index | Sheet index |
| integer | $type | Built-in name type |
| integer | $rowmin | Start row |
| integer | $rowmax | End row |
| integer | $colmin | Start colum |
| integer | $colmax | End column |
Definition at line 859 of file Workbook.php.

| store_name_short | ( | $ | index, |
| $ | type, | ||
| $ | rowmin, | ||
| $ | rowmax, | ||
| $ | colmin, | ||
| $ | colmax | ||
| ) |
Store the NAME record in the short format that is used for storing the print area, repeat rows only and repeat columns only.
| integer | $index | Sheet index |
| integer | $type | Built-in name type |
| integer | $rowmin | Start row |
| integer | $rowmax | End row |
| integer | $colmin | Start colum |
| integer | $colmax | End column |
Definition at line 794 of file Workbook.php.

| store_workbook | ( | ) |
Assemble worksheets into a workbook and send the BIFF data to an OLE storage.
Definition at line 329 of file Workbook.php.


| Workbook | ( | $ | filename | ) |
Class constructor
| string | filename for storing the workbook. "-" for writing to stdout. |
Definition at line 54 of file Workbook.php.

| worksheets | ( | ) |
An accessor for the _worksheets[] array.
Definition at line 117 of file Workbook.php.
