|
ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
|
Inheritance diagram for ilExcel:
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 $a_col, $a_value, ?string $a_datatype=null) | |
| 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 ($a_value) | |
| Prepare value for cell. More... | |
| prepareDateValue (ilDateTime $a_value) | |
| prepareBooleanValue (bool $a_value) | |
| prepareString (string $a_value) | |
| 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 559 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 586 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 572 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 353 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 380 of file class.ilExcel.php.
References columnIndexAdjustment().
Referenced by ilSumScoreTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilBookingReservationsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), assNumeric\setExportDetailsXLSX(), assTextQuestion\setExportDetailsXLSX(), assLongMenu\setExportDetailsXLSX(), assImagemapQuestion\setExportDetailsXLSX(), assFileUpload\setExportDetailsXLSX(), assKprimChoice\setExportDetailsXLSX(), assMultipleChoice\setExportDetailsXLSX(), assSingleChoice\setExportDetailsXLSX(), assOrderingQuestion\setExportDetailsXLSX(), assFormulaQuestion\setExportDetailsXLSX(), assClozeTest\setExportDetailsXLSX(), and assQuestion\setExportDetailsXLSX().
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 372 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 546 of file class.ilExcel.php.
References columnIndexAdjustment().
Referenced by addLink(), ilSurveyEvaluationGUI\exportResultsDetailsExcel(), getCell(), ilAssExcelFormatHelper\setCell(), 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 364 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 581 of file class.ilExcel.php.
|
protected |
Definition at line 223 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 208 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 410 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 230 of file class.ilExcel.php.
References cleanupNonCharachters().
Referenced by prepareValue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Prepare value for cell.
| mixed | $a_value |
| InvalidArgumentException |
Definition at line 184 of file class.ilExcel.php.
References 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 | ( | string | $a_file_name | ) |
Send workbook to client.
Definition at line 436 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 487 of file class.ilExcel.php.
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel(), ilSumScoreTableGUI\fillHeaderExcel(), ilLPProgressTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilBookingReservationsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), assNumeric\setExportDetailsXLSX(), assTextQuestion\setExportDetailsXLSX(), assLongMenu\setExportDetailsXLSX(), assImagemapQuestion\setExportDetailsXLSX(), assFileUpload\setExportDetailsXLSX(), assKprimChoice\setExportDetailsXLSX(), assMultipleChoice\setExportDetailsXLSX(), assSingleChoice\setExportDetailsXLSX(), assOrderingQuestion\setExportDetailsXLSX(), assFormulaQuestion\setExportDetailsXLSX(), assClozeTest\setExportDetailsXLSX(), and ilAssExcelFormatHelper\setFormattedExcelTitle().
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 | $a_col, | ||
| $a_value, | |||
| ?string | $a_datatype = null |
||
| ) |
Set cell value.
| int | $a_row | |
| int | $a_col | |
| mixed | $a_value | |
| ?string | $a_datatype Explicit data type, see DataType::TYPE_* |
Definition at line 288 of file class.ilExcel.php.
References getCoordByColumnAndRow(), prepareValue(), and setDateFormat().
Referenced by 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 330 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 257 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 495 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 of cell.
| Cell | $a_cell | |
| mixed | $a_value |
Definition at line 243 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 389 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 464 of file class.ilExcel.php.
References prepareStorage().
Here is the call graph for this function:| ilExcel::writeToTmpFile | ( | ) |
Definition at line 475 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.