|
ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
|
Collaboration diagram for ilExcel:Public Member Functions | |
| __construct () | |
| loadFromFile (string $filename) | |
| Loads a spreadsheet from file. More... | |
| getValidFormats () | |
| setFormat (string $a_format) | |
| Set file format. More... | |
| addSheet (string $a_name, bool $a_activate=true) | |
| Add sheet. More... | |
| setActiveSheet (int $a_index) | |
| 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 (int $a_row, int $col, $value, ?string $datatype=null, bool $disable_strip_tags_for_strings=false) | |
| Set cell value. More... | |
| setCellArray (array $a_values, string $a_top_left='A1', $a_null_value=null) | |
| Set cell values from array. More... | |
| getCell (int $a_row, int $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 (int $a_col) | |
| Get column "name" from number. More... | |
| sendToClient (string $a_file_name) | |
| Send workbook to client. More... | |
| writeToFile (string $a_file) | |
| Save workbook to file. More... | |
| writeToTmpFile () | |
| setBold (string $a_coords) | |
| Set cell(s) to bold. More... | |
| setColors (string $a_coords, string $a_background, string $a_font=null) | |
| Set cell(s) colors. More... | |
| setBorders (string $a_coords, bool $a_top, bool $a_right=false, bool $a_bottom=false, bool $a_left=false) | |
| Toggle cell(s) borders. More... | |
| getCoordByColumnAndRow (int $pColumn=1, int $pRow=1) | |
| Get cell coordinate (e.g. More... | |
| addLink (int $a_row, int $a_column, string $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 ($value) | |
| Prepare value for cell. More... | |
| prepareDateValue (ilDateTime $a_value) | |
| prepareBooleanValue (bool $a_value) | |
| prepareString (string $value, bool $disable_strip_tags=false) | |
| setDateFormat (Cell $a_cell, $a_value) | |
| Set date format of cell. More... | |
| setGlobalAutoSize () | |
| Set all existing columns on all sheets to autosize. More... | |
| prepareStorage (string $a_file_name) | |
| Prepare workbook for storage/delivery. More... | |
Protected Attributes | |
| string | $format |
| ilLanguage | $lng |
| Spreadsheet | $workbook |
| string | $type |
Private Member Functions | |
| cleanupNonCharachters (string $string) | |
Private Attributes | |
| array | $noncharacters |
Definition at line 34 of file class.ilExcel.php.
| ilExcel::__construct | ( | ) |
Definition at line 68 of file class.ilExcel.php.
References $DIC, ILIAS\Repository\lng(), and setFormat().
Here is the call graph for this function:| ilExcel::addLink | ( | int | $a_row, |
| int | $a_column, | ||
| string | $a_path | ||
| ) |
Definition at line 569 of file class.ilExcel.php.
References getCoordByColumnAndRow().
Here is the call graph for this function:| ilExcel::addSheet | ( | string | $a_name, |
| bool | $a_activate = true |
||
| ) |
Add sheet.
Definition at line 122 of file class.ilExcel.php.
References setActiveSheet(), and ilStr\shortenTextExtended().
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 596 of file class.ilExcel.php.
Referenced by prepareString().
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
Definition at line 582 of file class.ilExcel.php.
Referenced by getColumnCoord(), and getCoordByColumnAndRow().
Here is the caller graph for this function:| ilExcel::getCell | ( | int | $a_row, |
| int | $a_col | ||
| ) |
Returns the value of a cell.
Definition at line 363 of file class.ilExcel.php.
References getCoordByColumnAndRow().
Referenced by ilDclTextRecordFieldModel\getValueFromExcel(), ilDclBaseRecordFieldModel\getValueFromExcel(), and ilDclStandardField\getValueFromExcel().
Here is the call graph for this function:
Here is the caller graph for this function:| ilExcel::getColumnCoord | ( | int | $a_col | ) |
Get column "name" from number.
Definition at line 390 of file class.ilExcel.php.
References columnIndexAdjustment().
Referenced by ilSumScoreTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilBookingReservationsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), and ilTable2GUI\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 382 of file class.ilExcel.php.
| ilExcel::getCoordByColumnAndRow | ( | int | $pColumn = 1, |
| int | $pRow = 1 |
||
| ) |
Get cell coordinate (e.g.
"B2") for column and row number
Definition at line 556 of file class.ilExcel.php.
References columnIndexAdjustment().
Referenced by addLink(), ilSurveyEvaluationGUI\exportResultsDetailsExcel(), getCell(), and setCell().
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 374 of file class.ilExcel.php.
| ilExcel::getSheetCount | ( | ) |
Returns number of sheets.
Definition at line 159 of file class.ilExcel.php.
| ilExcel::getSheetTitle | ( | ) |
Return the current sheet title.
Definition at line 168 of file class.ilExcel.php.
| ilExcel::getValidFormats | ( | ) |
Definition at line 97 of file class.ilExcel.php.
Referenced by setFormat().
Here is the caller graph for this function:| ilExcel::loadFromFile | ( | string | $filename | ) |
| ilExcel::mergeCells | ( | string | $coordinatesRange | ) |
| string | $coordinatesRange | A coordinates range string like 'A1:B5' |
Definition at line 591 of file class.ilExcel.php.
|
protected |
Definition at line 220 of file class.ilExcel.php.
References $lng, and ilLanguage\txt().
Referenced by prepareValue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
| ilDateTime | $a_value |
Definition at line 205 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 420 of file class.ilExcel.php.
References setGlobalAutoSize().
Referenced by sendToClient(), and writeToFile().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 227 of file class.ilExcel.php.
References cleanupNonCharachters().
Referenced by prepareValue(), and setCell().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Prepare value for cell.
| mixed | $value |
| InvalidArgumentException |
Definition at line 184 of file class.ilExcel.php.
References prepareBooleanValue(), prepareDateValue(), and prepareString().
Referenced by setCell(), setCellArray(), and setCellByCoordinates().
Here is the call graph for this function:
Here is the caller graph for this function:| ilExcel::sendToClient | ( | string | $a_file_name | ) |
Send workbook to client.
Definition at line 446 of file class.ilExcel.php.
References ilFileDelivery\deliverFileAttached(), ilFileUtils\ilTempnam(), and prepareStorage().
Here is the call graph for this function:| ilExcel::setActiveSheet | ( | int | $a_index | ) |
Definition at line 150 of file class.ilExcel.php.
Referenced by addSheet().
Here is the caller graph for this function:| ilExcel::setBold | ( | string | $a_coords | ) |
Set cell(s) to bold.
Definition at line 497 of file class.ilExcel.php.
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel(), ilSumScoreTableGUI\fillHeaderExcel(), ilLPProgressTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilBookingReservationsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), and ilTable2GUI\fillHeaderExcel().
Here is the caller graph for this function:| ilExcel::setBorders | ( | string | $a_coords, |
| bool | $a_top, | ||
| bool | $a_right = false, |
||
| bool | $a_bottom = false, |
||
| bool | $a_left = false |
||
| ) |
| ilExcel::setCell | ( | int | $a_row, |
| int | $col, | ||
| $value, | |||
| ?string | $datatype = null, |
||
| bool | $disable_strip_tags_for_strings = false |
||
| ) |
Set cell value.
| int | $a_row | |
| int | $col | |
| mixed | $value | |
| ?string | $datatype Explicit data type, see DataType::TYPE_* |
Definition at line 291 of file class.ilExcel.php.
References getCoordByColumnAndRow(), prepareString(), prepareValue(), and setDateFormat().
Referenced by ILIAS\Test\Logging\TestLogViewer\addRowsFromLogs(), ilSurveyEvaluationGUI\exportResultsDetailsExcel(), ilDclTextSelectionRecordFieldModel\fillExcelExport(), ilDclTextRecordFieldModel\fillExcelExport(), ilDclBaseRecordFieldModel\fillExcelExport(), ilSumScoreTableGUI\fillHeaderExcel(), ilDclTextFieldModel\fillHeaderExcel(), ilSCORMTrackingItemsTableGUI\fillHeaderExcel(), ilSCORM2004TrackingItemsTableGUI\fillHeaderExcel(), ilDclStandardField\fillHeaderExcel(), ilLPProgressTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilDclBaseFieldModel\fillHeaderExcel(), ilBookingReservationsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), ilLPTableBaseGUI\fillMetaExcel(), ilDclBaseRecordModel\fillRecordFieldExcelExport(), ilSumScoreTableGUI\fillRowExcel(), ilPollAnswerTableGUI\fillRowExcel(), ilPollUserTableGUI\fillRowExcel(), ilUserLPTableGUI\fillRowExcel(), ilSCORMTrackingItemsTableGUI\fillRowExcel(), ilSCORM2004TrackingItemsTableGUI\fillRowExcel(), ILIAS\MyStaff\ListCompetences\Skills\ilMStListCompetencesSkillsTableGUI\fillRowExcel(), ILIAS\MyStaff\ListCertificates\ilMStListCertificatesTableGUI\fillRowExcel(), ilMStShowUserCoursesTableGUI\fillRowExcel(), ilLPObjectStatisticsTypesTableGUI\fillRowExcel(), ILIAS\MyStaff\ListUsers\ilMStListUsersTableGUI\fillRowExcel(), ilLPObjectStatisticsDailyTableGUI\fillRowExcel(), ilMStListCoursesTableGUI\fillRowExcel(), ilLPObjectStatisticsTableGUI\fillRowExcel(), ilLPProgressTableGUI\fillRowExcel(), ilTrObjectUsersPropsTableGUI\fillRowExcel(), ilTrUserObjectsPropsTableGUI\fillRowExcel(), ilTrMatrixTableGUI\fillRowExcel(), ilBookingReservationsTableGUI\fillRowExcel(), ilTrSummaryTableGUI\fillRowExcel(), ilTable2GUI\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, |
| string | $a_top_left = 'A1', |
||
$a_null_value = null |
|||
| ) |
Set cell values from array.
| array<int,mixed|array<int,mixed>> | $a_values | |
| string | $a_top_left | |
| mixed | $a_null_value | Value in source array that stands for blank cell |
Definition at line 340 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 | Coordinate of the cell, eg: 'A1' |
| mixed | $a_value |
Definition at line 260 of file class.ilExcel.php.
References prepareValue(), and setDateFormat().
Here is the call graph for this function:| ilExcel::setColors | ( | string | $a_coords, |
| string | $a_background, | ||
| string | $a_font = null |
||
| ) |
Set cell(s) colors.
Definition at line 505 of file class.ilExcel.php.
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel(), and ilSurveyEvaluationGUI\parseResultsToExcel().
Here is the caller graph for this function:
|
protected |
Set date format of cell.
| Cell | $a_cell | |
| mixed | $a_value |
Definition at line 246 of file class.ilExcel.php.
Referenced by setCell(), and setCellByCoordinates().
Here is the caller graph for this function:| ilExcel::setFormat | ( | string | $a_format | ) |
Set file format.
Definition at line 105 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 399 of file class.ilExcel.php.
Referenced by prepareStorage().
Here is the caller graph for this function:| ilExcel::writeToFile | ( | string | $a_file | ) |
Save workbook to file.
Definition at line 474 of file class.ilExcel.php.
References prepareStorage().
Here is the call graph for this function:| ilExcel::writeToTmpFile | ( | ) |
Definition at line 485 of file class.ilExcel.php.
References $filename, and ilFileUtils\ilTempnam().
Here is the call graph for this function:
|
protected |
Definition at line 38 of file class.ilExcel.php.
|
protected |
Definition at line 61 of file class.ilExcel.php.
Referenced by prepareBooleanValue().
|
private |
Definition at line 40 of file class.ilExcel.php.
|
protected |
Definition at line 63 of file class.ilExcel.php.
|
protected |
Definition at line 62 of file class.ilExcel.php.
| const ilExcel::FORMAT_BIFF = 'Xls' |
Definition at line 37 of file class.ilExcel.php.
| const ilExcel::FORMAT_XML = 'Xlsx' |
Definition at line 36 of file class.ilExcel.php.
Referenced by ILIAS\Test\ExportImport\ResultsExportExcel\write().