|
ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Inheritance diagram for ilExcel:
Collaboration diagram for ilExcel:Public Member Functions | |
| __construct () | |
| Constructor. More... | |
| loadFromFile ($filename) | |
| Loads a spreadsheet from file. More... | |
| getValidFormats () | |
| Get valid file formats. More... | |
| setFormat ($a_format) | |
| Set file format. More... | |
| addSheet ($a_name, $a_activate=true) | |
| Add sheet. More... | |
| setActiveSheet ($a_index) | |
| Set active sheet. More... | |
| getSheetCount () | |
| Returns number of sheets. More... | |
| getSheetTitle () | |
| Return the current sheet title. More... | |
| setCellByCoordinates ($a_coords, $a_value) | |
| Set cell value by coordinates. More... | |
| setCell ($a_row, $a_col, $a_value) | |
| Set cell value. More... | |
| setCellArray (array $a_values, $a_top_left="A1", $a_null_value=NULL) | |
| Set cell values from array. More... | |
| getCell ($a_row, $a_col) | |
| Returns the value of a cell. More... | |
| getSheetAsArray () | |
| Returns the active sheet as an array. More... | |
| getColumnCount () | |
| Returns the number of columns the sheet contains. More... | |
| getColumnCoord ($a_col) | |
| Get column "name" from number. More... | |
| sendToClient ($a_file_name) | |
| Send workbook to client. More... | |
| writeToFile ($a_file) | |
| Save workbook to file. More... | |
| writeToTmpFile () | |
| setBold ($a_coords) | |
| Set cell(s) to bold. More... | |
| setColors ($a_coords, $a_background, $a_font=null) | |
| Set cell(s) colors. More... | |
| setBorders ($a_coords, $a_top, $a_right=false, $a_bottom=false, $a_left=false) | |
| Toggle cell(s) borders. More... | |
| getCoordByColumnAndRow ($pColumn=0, $pRow=1) | |
| Get cell coordinate (e.g. More... | |
Data Fields | |
| const | FORMAT_XML = "Excel2007" |
| const | FORMAT_BIFF = "Excel5" |
Protected Member Functions | |
| prepareValue ($a_value) | |
| Prepare value for cell. More... | |
| prepareDateValue (ilDateTime $a_value) | |
| prepareBooleanValue ($a_value) | |
| prepareString ($a_value) | |
| setDateFormat (PHPExcel_Cell $a_cell, $a_value) | |
| Set date format. More... | |
| setGlobalAutoSize () | |
| Set all existing columns on all sheets to autosize. More... | |
| prepareStorage ($a_file_name) | |
| Prepare workbook for storage/delivery. More... | |
Protected Attributes | |
| $workbook | |
| $type | |
Definition at line 12 of file class.ilExcel.php.
| ilExcel::__construct | ( | ) |
Constructor.
Reimplemented in ilAssExcelFormatHelper.
Definition at line 32 of file class.ilExcel.php.
References setFormat().
Here is the call graph for this function:| ilExcel::addSheet | ( | $a_name, | |
$a_activate = true |
|||
| ) |
Add sheet.
| string | $a_name | |
| bool | $a_activate |
Definition at line 90 of file class.ilExcel.php.
References setActiveSheet(), and ilUtil\shortenText().
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel().
Here is the call graph for this function:
Here is the caller graph for this function:| ilExcel::getCell | ( | $a_row, | |
| $a_col | |||
| ) |
Returns the value of a cell.
| int | $a_row | |
| int | $a_col |
Definition at line 351 of file class.ilExcel.php.
| ilExcel::getColumnCoord | ( | $a_col | ) |
Get column "name" from number.
| int | $a_col |
Definition at line 381 of file class.ilExcel.php.
References PHPExcel_Cell\stringFromColumnIndex().
Referenced by ilBookingReservationsTableGUI\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), and ilTrUserObjectsPropsTableGUI\fillHeaderExcel().
Here is the call graph for this function:
Here is the caller graph for this function:| ilExcel::getColumnCount | ( | ) |
Returns the number of columns the sheet contains.
Definition at line 371 of file class.ilExcel.php.
References PHPExcel_Cell\columnIndexFromString().
Here is the call graph for this function:| ilExcel::getCoordByColumnAndRow | ( | $pColumn = 0, |
|
$pRow = 1 |
|||
| ) |
Get cell coordinate (e.g.
"B2") for column and row number
| int | $pColumn | |
| int | $pRow |
Definition at line 573 of file class.ilExcel.php.
References PHPExcel_Cell\stringFromColumnIndex().
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel().
Here is the call graph for this function:
Here is the caller graph for this function:| ilExcel::getSheetAsArray | ( | ) |
Returns the active sheet as an array.
Definition at line 361 of file class.ilExcel.php.
| ilExcel::getSheetCount | ( | ) |
Returns number of sheets.
Definition at line 130 of file class.ilExcel.php.
| ilExcel::getSheetTitle | ( | ) |
Return the current sheet title.
Definition at line 140 of file class.ilExcel.php.
| ilExcel::getValidFormats | ( | ) |
Get valid file formats.
Definition at line 60 of file class.ilExcel.php.
Referenced by setFormat().
Here is the caller graph for this function:| ilExcel::loadFromFile | ( | $filename | ) |
Loads a spreadsheet from file.
| $filename |
Definition at line 47 of file class.ilExcel.php.
References $filename, and PHPExcel_IOFactory\load().
Here is the call graph for this function:
|
protected |
| bool | $a_value |
Definition at line 200 of file class.ilExcel.php.
References $lng.
Referenced by prepareValue().
Here is the caller graph for this function:
|
protected |
| ilDateTime | $a_value |
Definition at line 180 of file class.ilExcel.php.
References ilDateTime\get(), IL_CAL_DATE, IL_CAL_DATETIME, and PHPExcel_Shared_Date\stringToExcel().
Referenced by prepareValue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Prepare workbook for storage/delivery.
Definition at line 412 of file class.ilExcel.php.
References FORMAT_BIFF, FORMAT_XML, and setGlobalAutoSize().
Referenced by sendToClient(), and writeToFile().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
| string | $a_value |
Reimplemented in ilAssExcelFormatHelper.
Definition at line 211 of file class.ilExcel.php.
Referenced by prepareValue().
Here is the caller graph for this function:
|
protected |
Prepare value for cell.
| mixed | $a_value |
Definition at line 155 of file class.ilExcel.php.
References $lng, prepareBooleanValue(), prepareDateValue(), and prepareString().
Referenced by ilAssExcelFormatHelper\setCell(), setCell(), setCellArray(), ilAssExcelFormatHelper\setCellByCoordinates(), and setCellByCoordinates().
Here is the call graph for this function:
Here is the caller graph for this function:| ilExcel::sendToClient | ( | $a_file_name | ) |
Send workbook to client.
| string | $a_file_name |
Definition at line 442 of file class.ilExcel.php.
References ilMimeTypeUtil\APPLICATION__OCTET_STREAM, ilMimeTypeUtil\APPLICATION__VND_MS_EXCEL, ilMimeTypeUtil\APPLICATION__VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET, PHPExcel_IOFactory\createWriter(), ilFileDelivery\DIRECT_PHP_OUTPUT, FORMAT_BIFF, FORMAT_XML, and prepareStorage().
Here is the call graph for this function:| ilExcel::setActiveSheet | ( | $a_index | ) |
Set active sheet.
| int | $a_index |
Definition at line 119 of file class.ilExcel.php.
Referenced by addSheet().
Here is the caller graph for this function:| ilExcel::setBold | ( | $a_coords | ) |
Set cell(s) to bold.
| string | $a_coords |
Definition at line 503 of file class.ilExcel.php.
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel(), ilBookingReservationsTableGUI\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), ilLPProgressTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), and ilAssExcelFormatHelper\setFormattedExcelTitle().
Here is the caller graph for this function:| ilExcel::setBorders | ( | $a_coords, | |
| $a_top, | |||
$a_right = false, |
|||
$a_bottom = false, |
|||
$a_left = false |
|||
| ) |
Toggle cell(s) borders.
| string | $a_coords | |
| bool | $a_top | |
| bool | $a_right | |
| bool | $a_bottom | |
| bool | $a_left |
Definition at line 543 of file class.ilExcel.php.
References $style, and PHPExcel_Style_Border\BORDER_THIN.
| ilExcel::setCell | ( | $a_row, | |
| $a_col, | |||
| $a_value | |||
| ) |
Set cell value.
| int | $a_row | |
| int | $a_col | |
| mixed | $a_value |
Reimplemented in ilAssExcelFormatHelper.
Definition at line 281 of file class.ilExcel.php.
References prepareValue(), setDateFormat(), PHPExcel_Cell_DataType\TYPE_NUMERIC, and PHPExcel_Cell_DataType\TYPE_STRING.
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel(), ilBookingReservationsTableGUI\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), ilLPProgressTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), ilDclTextFieldModel\fillHeaderExcel(), ilLPTableBaseGUI\fillMetaExcel(), ilBookingReservationsTableGUI\fillRowExcel(), ilPollAnswerTableGUI\fillRowExcel(), ilPollUserTableGUI\fillRowExcel(), ilTable2GUI\fillRowExcel(), ilLPObjectStatisticsDailyTableGUI\fillRowExcel(), ilLPObjectStatisticsTableGUI\fillRowExcel(), ilLPObjectStatisticsTypesTableGUI\fillRowExcel(), ilLPProgressTableGUI\fillRowExcel(), ilTrMatrixTableGUI\fillRowExcel(), ilTrObjectUsersPropsTableGUI\fillRowExcel(), ilTrSummaryTableGUI\fillRowExcel(), ilTrUserObjectsPropsTableGUI\fillRowExcel(), ilUserLPTableGUI\fillRowExcel(), and ilSurveyEvaluationGUI\parseResultsToExcel().
Here is the call graph for this function:
Here is the caller graph for this function:| ilExcel::setCellArray | ( | array | $a_values, |
$a_top_left = "A1", |
|||
$a_null_value = NULL |
|||
| ) |
Set cell values from array.
| array | $a_values | |
| string | $a_top_left | |
| mixed | $a_null_value |
Definition at line 322 of file class.ilExcel.php.
References prepareValue().
Here is the call graph for this function:| ilExcel::setCellByCoordinates | ( | $a_coords, | |
| $a_value | |||
| ) |
Set cell value by coordinates.
| string | $a_coords | |
| mixed | $a_value |
Reimplemented in ilAssExcelFormatHelper.
Definition at line 242 of file class.ilExcel.php.
References prepareValue(), setDateFormat(), PHPExcel_Cell_DataType\TYPE_NUMERIC, and PHPExcel_Cell_DataType\TYPE_STRING.
Here is the call graph for this function:| ilExcel::setColors | ( | $a_coords, | |
| $a_background, | |||
$a_font = null |
|||
| ) |
Set cell(s) colors.
| string | $a_coords | |
| string | $a_background | |
| string | $a_font |
Definition at line 515 of file class.ilExcel.php.
References PHPExcel_Style_Fill\FILL_SOLID.
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel(), ilSurveyEvaluationGUI\parseResultsToExcel(), and ilAssExcelFormatHelper\setFormattedExcelTitle().
Here is the caller graph for this function:
|
protected |
Set date format.
| PHPExcel_Cell | $a_cell | |
| mixed | $a_value |
Definition at line 222 of file class.ilExcel.php.
References PHPExcel_Cell\getStyle().
Referenced by setCell(), and setCellByCoordinates().
Here is the call graph for this function:
Here is the caller graph for this function:| ilExcel::setFormat | ( | $a_format | ) |
Set file format.
| string | $a_format |
Definition at line 70 of file class.ilExcel.php.
References getValidFormats().
Referenced by __construct().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Set all existing columns on all sheets to autosize.
Definition at line 389 of file class.ilExcel.php.
References $worksheet.
Referenced by prepareStorage().
Here is the caller graph for this function:| ilExcel::writeToFile | ( | $a_file | ) |
Save workbook to file.
| string | $a_file | full path |
Definition at line 473 of file class.ilExcel.php.
References PHPExcel_IOFactory\createWriter(), and prepareStorage().
Here is the call graph for this function:| ilExcel::writeToTmpFile | ( | ) |
Definition at line 486 of file class.ilExcel.php.
References $filename, PHPExcel_IOFactory\createWriter(), and ilUtil\ilTempnam().
Here is the call graph for this function:
|
protected |
Definition at line 22 of file class.ilExcel.php.
|
protected |
Definition at line 17 of file class.ilExcel.php.
| const ilExcel::FORMAT_BIFF = "Excel5" |
Definition at line 25 of file class.ilExcel.php.
Referenced by prepareStorage(), and sendToClient().
| const ilExcel::FORMAT_XML = "Excel2007" |
Definition at line 24 of file class.ilExcel.php.
Referenced by prepareStorage(), and sendToClient().