Moodle  2.2.1
http://www.collinsharper.com
MoodleExcelWorksheet Class Reference

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

Detailed Description

Definition at line 126 of file excellib.class.php.


Member Function Documentation

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

Parameters:
integer$rowThe row we are going to insert the bitmap into
integer$colThe column we are going to insert the bitmap into
string$bitmapThe bitmap filename
integer$xThe horizontal position (offset) of the image inside the cell.
integer$yThe vertical position (offset) of the image inside the cell.
integer$scale_xThe horizontal scale
integer$scale_yThe 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

Parameters:
integer$first_rowFirst row of the area to merge
integer$first_colFirst column of the area to merge
integer$last_rowLast row of the area to merge
integer$last_colLast column of the area to merge

Merge cells safely to the PEAR Worksheet

Definition at line 383 of file excellib.class.php.

Returns the PEAR Excel Format for one Moodle Excel Format

Parameters:
mixed$formatMoodleExcelFormat object
Returns:
mixed PEAR Excel Format object

Definition at line 394 of file excellib.class.php.

Here is the caller graph for this function:

MoodleExcelWorksheet ( name,
&$  workbook,
latin_output = false 
)

Constructs one Moodle Worksheet.

Parameters:
string$filenameThe name of the file
object$workbookThe internal PEAR Workbook onject we are creating
bool$latin_outputOnly 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.

Here is the call graph for this function:

set_column ( firstcol,
lastcol,
width,
format = null,
hidden = false,
level = 0 
)

Sets the width (and other settings) of one column

Parameters:
integer$firstcolfirst column on the range
integer$lastcollast column on the range
integer$widthwidth to set
mixed$formatThe optional XF format to apply to the columns
integer$hiddenThe optional hidden atribute
integer$levelThe 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.

Here is the call graph for this function:

set_row ( row,
height,
format = null,
hidden = false,
level = 0 
)

Sets the height (and other settings) of one row

Parameters:
integer$rowThe row to set
integer$heightHeight we are giving to the row (null to set just format withouth setting the height)
mixed$formatThe optional XF format we are giving to the row
bool$hiddenThe optional hidden attribute
integer$levelThe 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.

Here is the call graph for this function:

write ( row,
col,
token,
format = null 
)

Write anything somewhere in the worksheet Type will be automatically detected

Parameters:
integer$rowZero indexed row
integer$colZero indexed column
mixed$tokenWhat we are writing
mixed$formatThe XF format for the cell
Returns:
void

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.

Here is the call graph for this function:

write_blank ( row,
col,
format = null 
)

Write one blanck somewhere in the worksheet

Parameters:
integer$rowZero indexed row
integer$colZero indexed column
mixed$formatThe 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.

Here is the call graph for this function:

Here is the caller graph for this function:

write_date ( row,
col,
date,
format = null 
)

Write one date somewhere in the worksheet

Parameters:
integer$rowZero indexed row
integer$colZero indexed column
string$dateThe date to write in UNIX timestamp format
mixed$formatThe 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.

Here is the call graph for this function:

write_formula ( row,
col,
formula,
format = null 
)

Write one formula somewhere in the worksheet

Parameters:
integer$rowZero indexed row
integer$colZero indexed column
string$formulaThe formula to write
mixed$formatThe 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.

Here is the call graph for this function:

Here is the caller graph for this function:

write_number ( row,
col,
num,
format = null 
)

Write one number somewhere in the worksheet

Parameters:
integer$rowZero indexed row
integer$colZero indexed column
float$numThe number to write
mixed$formatThe 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.

Here is the call graph for this function:

Here is the caller graph for this function:

write_string ( row,
col,
str,
format = null 
)

Write one string somewhere in the worksheet

Parameters:
integer$rowZero indexed row
integer$colZero indexed column
string$strThe string to write
mixed$formatThe 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.

Here is the call graph for this function:

Here is the caller graph for this function:

write_url ( row,
col,
url,
format = null 
)

Write one url somewhere in the worksheet

Parameters:
integer$rowZero indexed row
integer$colZero indexed column
string$urlThe url to write
mixed$formatThe 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.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$latin_output

Definition at line 130 of file excellib.class.php.

$pear_excel_worksheet

Definition at line 128 of file excellib.class.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations