|
ILIAS
release_7 Revision v7.30-3-g800a261c036
|
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, $a_datatype=null) | |
| 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=1, $pRow=1) | |
| Get cell coordinate (e.g. More... | |
| addLink ($a_row, $a_column, $a_path) | |
| columnIndexAdjustment (int $column) | |
| Adjustment needed because of migration PHPExcel to PhpSpreadsheet. More... | |
| mergeCells (string $coordinatesRange) | |
Data Fields | |
| const | FORMAT_XML = "Xlsx" |
| const | FORMAT_BIFF = "Xls" |
Protected Member Functions | |
| prepareValue ($a_value) | |
| Prepare value for cell. More... | |
| prepareDateValue (ilDateTime $a_value) | |
| prepareBooleanValue ($a_value) | |
| prepareString ($a_value) | |
| setDateFormat (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 | |
| $lng | |
| $workbook | |
| $type | |
Definition at line 22 of file class.ilExcel.php.
| ilExcel::__construct | ( | ) |
Constructor.
Reimplemented in ilAssExcelFormatHelper.
Definition at line 47 of file class.ilExcel.php.
References $DIC, and setFormat().
Here is the call graph for this function:| ilExcel::addLink | ( | $a_row, | |
| $a_column, | |||
| $a_path | |||
| ) |
| $a_row | int |
| $a_column | int |
| $a_path |
Definition at line 582 of file class.ilExcel.php.
References columnIndexAdjustment().
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 108 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::columnIndexAdjustment | ( | int | $column | ) |
Adjustment needed because of migration PHPExcel to PhpSpreadsheet.
PhpExcel column was 0 index based and PhpSpreadshet set this index to 1
| $column |
Definition at line 595 of file class.ilExcel.php.
Referenced by addLink(), getCell(), getColumnCoord(), getCoordByColumnAndRow(), and setCell().
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 350 of file class.ilExcel.php.
References columnIndexAdjustment().
Here is the call graph for this function:| ilExcel::getColumnCoord | ( | $a_col | ) |
Get column "name" from number.
| int | $a_col |
Definition at line 385 of file class.ilExcel.php.
References columnIndexAdjustment().
Referenced by ilBookingReservationsTableGUI\fillHeaderExcel(), ilSumScoreTableGUI\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 374 of file class.ilExcel.php.
| ilExcel::getCoordByColumnAndRow | ( | $pColumn = 1, |
|
$pRow = 1 |
|||
| ) |
Get cell coordinate (e.g.
"B2") for column and row number
| int | $pColumn | |
| int | $pRow |
Definition at line 569 of file class.ilExcel.php.
References columnIndexAdjustment().
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 363 of file class.ilExcel.php.
| ilExcel::getSheetCount | ( | ) |
Returns number of sheets.
Definition at line 147 of file class.ilExcel.php.
| ilExcel::getSheetTitle | ( | ) |
Return the current sheet title.
Definition at line 158 of file class.ilExcel.php.
| ilExcel::getValidFormats | ( | ) |
Get valid file formats.
Definition at line 79 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 65 of file class.ilExcel.php.
References $filename.
| ilExcel::mergeCells | ( | string | $coordinatesRange | ) |
| string | $coordinatesRange | A coordinates range string like 'A1:B5' |
PhpOffice\PhpSpreadsheet\Exception
Definition at line 604 of file class.ilExcel.php.
|
protected |
| bool | $a_value |
Definition at line 213 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 194 of file class.ilExcel.php.
References ilDateTime\get(), IL_CAL_DATE, and IL_CAL_DATETIME.
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 416 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 224 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 174 of file class.ilExcel.php.
References $lng, prepareBooleanValue(), prepareDateValue(), and prepareString().
Referenced by setCell(), ilAssExcelFormatHelper\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 443 of file class.ilExcel.php.
References ilMimeTypeUtil\APPLICATION__OCTET_STREAM, ilMimeTypeUtil\APPLICATION__VND_MS_EXCEL, ilMimeTypeUtil\APPLICATION__VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET, ilFileDelivery\deliverFileAttached(), FORMAT_BIFF, FORMAT_XML, ilUtil\ilTempnam(), and prepareStorage().
Here is the call graph for this function:| ilExcel::setActiveSheet | ( | $a_index | ) |
Set active sheet.
| int | $a_index |
Definition at line 136 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 504 of file class.ilExcel.php.
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel(), ilBookingReservationsTableGUI\fillHeaderExcel(), ilSumScoreTableGUI\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.
| ilExcel::setCell | ( | $a_row, | |
| $a_col, | |||
| $a_value, | |||
$a_datatype = null |
|||
| ) |
Set cell value.
| int | $a_row | |
| int | $a_col | |
| mixed | $a_value | |
| null | $a_datatype |
PhpOffice\PhpSpreadsheet\Exception
Reimplemented in ilAssExcelFormatHelper.
Definition at line 284 of file class.ilExcel.php.
References columnIndexAdjustment(), prepareValue(), and setDateFormat().
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel(), ilDclBaseRecordFieldModel\fillExcelExport(), ilDclTextRecordFieldModel\fillExcelExport(), ilDclTextSelectionRecordFieldModel\fillExcelExport(), ilBookingReservationsTableGUI\fillHeaderExcel(), ilSumScoreTableGUI\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), ilLPProgressTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), ilSCORM2004TrackingItemsTableGUI\fillHeaderExcel(), ilSCORMTrackingItemsTableGUI\fillHeaderExcel(), ilDclBaseFieldModel\fillHeaderExcel(), ilDclStandardField\fillHeaderExcel(), ilDclTextFieldModel\fillHeaderExcel(), ilLPTableBaseGUI\fillMetaExcel(), ilDclBaseRecordModel\fillRecordFieldExcelExport(), ilBookingReservationsTableGUI\fillRowExcel(), ilPollAnswerTableGUI\fillRowExcel(), ilPollUserTableGUI\fillRowExcel(), ilSumScoreTableGUI\fillRowExcel(), ilTable2GUI\fillRowExcel(), ilLPObjectStatisticsDailyTableGUI\fillRowExcel(), ilLPObjectStatisticsTableGUI\fillRowExcel(), ilLPObjectStatisticsTypesTableGUI\fillRowExcel(), ilLPProgressTableGUI\fillRowExcel(), ilTrMatrixTableGUI\fillRowExcel(), ilTrObjectUsersPropsTableGUI\fillRowExcel(), ilTrSummaryTableGUI\fillRowExcel(), ilTrUserObjectsPropsTableGUI\fillRowExcel(), ilUserLPTableGUI\fillRowExcel(), ILIAS\MyStaff\ListUsers\ilMStListUsersTableGUI\fillRowExcel(), ILIAS\MyStaff\ListCompetences\Skills\ilMStListCompetencesSkillsTableGUI\fillRowExcel(), ILIAS\MyStaff\ListCourses\ilMStListCoursesTableGUI\fillRowExcel(), ILIAS\MyStaff\Courses\ShowUser\ilMStShowUserCoursesTableGUI\fillRowExcel(), ILIAS\MyStaff\ListCertificates\ilMStListCertificatesTableGUI\fillRowExcel(), ilSCORM2004TrackingItemsTableGUI\fillRowExcel(), ilSCORMTrackingItemsTableGUI\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 326 of file class.ilExcel.php.
References $cols, and 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 252 of file class.ilExcel.php.
References prepareValue(), and setDateFormat().
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 516 of file class.ilExcel.php.
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel(), ilSurveyEvaluationGUI\parseResultsToExcel(), and ilAssExcelFormatHelper\setFormattedExcelTitle().
Here is the caller graph for this function:
|
protected |
Set date format.
| Cell | $a_cell | |
| mixed | $a_value |
Definition at line 235 of file class.ilExcel.php.
Referenced by setCell(), and setCellByCoordinates().
Here is the caller graph for this function:| ilExcel::setFormat | ( | $a_format | ) |
Set file format.
| string | $a_format |
Definition at line 89 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 395 of file class.ilExcel.php.
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 prepareStorage().
Here is the call graph for this function:| ilExcel::writeToTmpFile | ( | ) |
PHPExcel_Reader_Exception
Definition at line 486 of file class.ilExcel.php.
References $filename, and ilUtil\ilTempnam().
Here is the call graph for this function:
|
protected |
Definition at line 27 of file class.ilExcel.php.
Referenced by prepareBooleanValue(), and prepareValue().
|
protected |
Definition at line 37 of file class.ilExcel.php.
|
protected |
Definition at line 32 of file class.ilExcel.php.
| const ilExcel::FORMAT_BIFF = "Xls" |
Definition at line 40 of file class.ilExcel.php.
Referenced by prepareStorage(), and sendToClient().
| const ilExcel::FORMAT_XML = "Xlsx" |
Definition at line 39 of file class.ilExcel.php.
Referenced by prepareStorage(), and sendToClient().