Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
ODS Worksheet abstraction. More...
Public Member Functions | |
__construct ($name, array $worksheets) | |
Constructs one Moodle Worksheet. More... | |
hide_gridlines () | |
Set the option to hide gridlines on the printed page. | |
hide_screen_gridlines () | |
Set the option to hide gridlines on the worksheet (as seen on the screen). | |
insert_bitmap ($row, $col, $bitmap, $x=0, $y=0, $scale_x=1, $scale_y=1) | |
Insert a 24bit bitmap image in a worksheet. More... | |
merge_cells ($first_row, $first_col, $last_row, $last_col) | |
Merges the area given by its arguments. More... | |
set_column ($firstcol, $lastcol, $width, $format=null, $hidden=false, $level=0) | |
Sets the width (and other settings) of one column. More... | |
set_row ($row, $height, $format=null, $hidden=false, $level=0) | |
Sets the height (and other settings) of one row. More... | |
write ($row, $col, $token, $format=null) | |
Write anything somewhere in the worksheet, type will be automatically detected. More... | |
write_blank ($row, $col, $format=null) | |
Write one blank somewhere in the worksheet. More... | |
write_date ($row, $col, $date, $format=null) | |
Write one date somewhere in the worksheet. More... | |
write_formula ($row, $col, $formula, $format=null) | |
Write one formula somewhere in the worksheet. More... | |
write_number ($row, $col, $num, $format=null) | |
Write one number somewhere in the worksheet. More... | |
write_string ($row, $col, $str, $format=null) | |
Write one string somewhere in the worksheet. More... | |
write_url ($row, $col, $url, $format=null) | |
Write one url somewhere in the worksheet. More... | |
Public Attributes | |
$columns = array() | |
$data = array() | |
$name | |
$rows = array() | |
$showgrid = true | |
ODS Worksheet abstraction.
MoodleODSWorksheet::__construct | ( | $name, | |
array | $worksheets | ||
) |
Constructs one Moodle Worksheet.
string | $name | The name of the file |
array | $worksheets | existing worksheets |
MoodleODSWorksheet::insert_bitmap | ( | $row, | |
$col, | |||
$bitmap, | |||
$x = 0 , |
|||
$y = 0 , |
|||
$scale_x = 1 , |
|||
$scale_y = 1 |
|||
) |
Insert a 24bit bitmap image in a worksheet.
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 |
MoodleODSWorksheet::merge_cells | ( | $first_row, | |
$first_col, | |||
$last_row, | |||
$last_col | |||
) |
Merges the area given by its arguments.
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 |
MoodleODSWorksheet::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 (null to set just format without setting the width) |
mixed | $format | The optional format to apply to the columns |
bool | $hidden | The optional hidden attribute |
integer | $level | The optional outline level (0-7) |
MoodleODSWorksheet::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 without setting the height) |
mixed | $format | The optional format we are giving to the row |
bool | $hidden | The optional hidden attribute |
integer | $level | The optional outline level (0-7) |
MoodleODSWorksheet::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 |
MoodleODSWorksheet::write_blank | ( | $row, | |
$col, | |||
$format = null |
|||
) |
Write one blank somewhere in the worksheet.
integer | $row | Zero indexed row |
integer | $col | Zero indexed column |
mixed | $format | The XF format for the cell |
MoodleODSWorksheet::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 url to write |
mixed | $format | The XF format for the cell |
MoodleODSWorksheet::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 |
MoodleODSWorksheet::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 |
MoodleODSWorksheet::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 |
MoodleODSWorksheet::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 |