|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| MoodleExcelWorksheet ($name, &$workbook, $latin_output=false) | |
| write_string ($row, $col, $str, $format=null) | |
| write_number ($row, $col, $num, $format=null) | |
| write_url ($row, $col, $url, $format=null) | |
| write_date ($row, $col, $date, $format=null) | |
| write_formula ($row, $col, $formula, $format=null) | |
| write_blank ($row, $col, $format=null) | |
| write ($row, $col, $token, $format=null) | |
| set_row ($row, $height, $format=null, $hidden=false, $level=0) | |
| set_column ($firstcol, $lastcol, $width, $format=null, $hidden=false, $level=0) | |
| hide_gridlines () | |
| hide_screen_gridlines () | |
| insert_bitmap ($row, $col, $bitmap, $x=0, $y=0, $scale_x=1, $scale_y=1) | |
| merge_cells ($first_row, $first_col, $last_row, $last_col) | |
| MoodleExcelFormat2PearExcelFormat ($format) | |
Data Fields | |
| $pear_excel_worksheet | |
| $latin_output | |
Definition at line 126 of file excellib.class.php.
| hide_gridlines | ( | ) |
Set the option to hide gridlines on the printed page.
public
Definition at line 342 of file excellib.class.php.
Set the option to hide gridlines on the worksheet (as seen on the screen).
public
Definition at line 351 of file excellib.class.php.
| insert_bitmap | ( | $ | row, |
| $ | col, | ||
| $ | bitmap, | ||
| $ | x = 0, |
||
| $ | y = 0, |
||
| $ | scale_x = 1, |
||
| $ | scale_y = 1 |
||
| ) |
Insert a 24bit bitmap image in a worksheet.
public
| integer | $row | The row we are going to insert the bitmap into |
| integer | $col | The column we are going to insert the bitmap into |
| string | $bitmap | The bitmap filename |
| integer | $x | The horizontal position (offset) of the image inside the cell. |
| integer | $y | The vertical position (offset) of the image inside the cell. |
| integer | $scale_x | The horizontal scale |
| integer | $scale_y | The vertical scale |
Add the bitmap safely to the PEAR Worksheet
Definition at line 367 of file excellib.class.php.
| merge_cells | ( | $ | first_row, |
| $ | first_col, | ||
| $ | last_row, | ||
| $ | last_col | ||
| ) |
Merges the area given by its arguments. This is an Excel97/2000 method. It is required to perform more complicated merging than the normal setAlign('merge').
public
| integer | $first_row | First row of the area to merge |
| integer | $first_col | First column of the area to merge |
| integer | $last_row | Last row of the area to merge |
| integer | $last_col | Last column of the area to merge |
Merge cells safely to the PEAR Worksheet
Definition at line 383 of file excellib.class.php.
| MoodleExcelFormat2PearExcelFormat | ( | $ | format | ) |
Returns the PEAR Excel Format for one Moodle Excel Format
| mixed | $format | MoodleExcelFormat object |
Definition at line 394 of file excellib.class.php.

| MoodleExcelWorksheet | ( | $ | name, |
| &$ | workbook, | ||
| $ | latin_output = false |
||
| ) |
Constructs one Moodle Worksheet.
| string | $filename | The name of the file |
| object | $workbook | The internal PEAR Workbook onject we are creating |
| bool | $latin_output | Only if don't want to use latin (win1252) stronger output |
Internally, add one sheet to the workbook
Set encoding to UTF-16LE
Only if don't want to use latin (win1252) stronger output
Definition at line 139 of file excellib.class.php.

| set_column | ( | $ | firstcol, |
| $ | lastcol, | ||
| $ | width, | ||
| $ | format = null, |
||
| $ | hidden = false, |
||
| $ | level = 0 |
||
| ) |
Sets the width (and other settings) of one column
| integer | $firstcol | first column on the range |
| integer | $lastcol | last column on the range |
| integer | $width | width to set |
| mixed | $format | The optional XF format to apply to the columns |
| integer | $hidden | The optional hidden atribute |
| integer | $level | The optional outline level (0-7) |
Calculate the internal PEAR format
Set the column safely to the PEAR Worksheet
Definition at line 330 of file excellib.class.php.

| set_row | ( | $ | row, |
| $ | height, | ||
| $ | format = null, |
||
| $ | hidden = false, |
||
| $ | level = 0 |
||
| ) |
Sets the height (and other settings) of one row
| integer | $row | The row to set |
| integer | $height | Height we are giving to the row (null to set just format withouth setting the height) |
| mixed | $format | The optional XF format we are giving to the row |
| bool | $hidden | The optional hidden attribute |
| integer | $level | The optional outline level (0-7) |
Calculate the internal PEAR format
Set the row safely to the PEAR Worksheet
Definition at line 313 of file excellib.class.php.

| write | ( | $ | row, |
| $ | col, | ||
| $ | token, | ||
| $ | format = null |
||
| ) |
Write anything somewhere in the worksheet Type will be automatically detected
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
| mixed | $token | What we are writing |
| mixed | $format | The XF format for the cell |
Analyse what are we trying to send
Match number
Match http or ftp URL
Match mailto:
Match internal or external sheet link
Match formula
Match formula
Match blank
Default: match string
Definition at line 274 of file excellib.class.php.

| write_blank | ( | $ | row, |
| $ | col, | ||
| $ | format = null |
||
| ) |
Write one blanck somewhere in the worksheet
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
| mixed | $format | The XF format for the cell |
Calculate the internal PEAR format
Add the blank safely to the PEAR Worksheet
Definition at line 257 of file excellib.class.php.


| write_date | ( | $ | row, |
| $ | col, | ||
| $ | date, | ||
| $ | format = null |
||
| ) |
Write one date somewhere in the worksheet
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
| string | $date | The date to write in UNIX timestamp format |
| mixed | $format | The XF format for the cell |
Calculate the internal PEAR format
Convert the date to Excel format
Add the date safely to the PEAR Worksheet
Definition at line 219 of file excellib.class.php.

| write_formula | ( | $ | row, |
| $ | col, | ||
| $ | formula, | ||
| $ | format = null |
||
| ) |
Write one formula somewhere in the worksheet
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
| string | $formula | The formula to write |
| mixed | $format | The XF format for the cell |
Calculate the internal PEAR format
Add the formula safely to the PEAR Worksheet
Definition at line 243 of file excellib.class.php.


| write_number | ( | $ | row, |
| $ | col, | ||
| $ | num, | ||
| $ | format = null |
||
| ) |
Write one number somewhere in the worksheet
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
| float | $num | The number to write |
| mixed | $format | The XF format for the cell |
Calculate the internal PEAR format
Add the number safely to the PEAR Worksheet
Definition at line 190 of file excellib.class.php.


| write_string | ( | $ | row, |
| $ | col, | ||
| $ | str, | ||
| $ | format = null |
||
| ) |
Write one string somewhere in the worksheet
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
| string | $str | The string to write |
| mixed | $format | The XF format for the cell |
Calculate the internal PEAR format
Loading the textlib singleton instance. We are going to need it.
Convert the text from its original encoding to UTF-16LE
Only if don't want to use latin (win1252) stronger output
else, convert to latin (win1252)
Add the string safely to the PEAR Worksheet
Definition at line 167 of file excellib.class.php.


| write_url | ( | $ | row, |
| $ | col, | ||
| $ | url, | ||
| $ | format = null |
||
| ) |
Write one url somewhere in the worksheet
| integer | $row | Zero indexed row |
| integer | $col | Zero indexed column |
| string | $url | The url to write |
| mixed | $format | The XF format for the cell |
Calculate the internal PEAR format
Add the url safely to the PEAR Worksheet
Definition at line 205 of file excellib.class.php.


| $latin_output |
Definition at line 130 of file excellib.class.php.
| $pear_excel_worksheet |
Definition at line 128 of file excellib.class.php.