|
ILIAS
release_8 Revision v8.24
|
Inheritance diagram for ilExcel:
Collaboration diagram for ilExcel:Public Member Functions | |
| __construct () | |
| loadFromFile (string $filename) | |
| Loads a spreadsheet from file. More... | |
| getValidFormats () | |
| Get valid file formats. More... | |
| 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 | ( | ) |
PhpOffice\PhpSpreadsheet\Exception
Reimplemented in ilAssExcelFormatHelper.
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 | ||
| ) |
PhpOffice\PhpSpreadsheet\Exception
Definition at line 563 of file class.ilExcel.php.
| ilExcel::addSheet | ( | string | $a_name, |
| bool | $a_activate = true |
||
| ) |
Add sheet.
PhpOffice\PhpSpreadsheet\Exception
Definition at line 122 of file class.ilExcel.php.
|
private |
Definition at line 590 of file class.ilExcel.php.
| 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 576 of file class.ilExcel.php.
| ilExcel::getCell | ( | int | $a_row, |
| int | $a_col | ||
| ) |
Returns the value of a cell.
Definition at line 357 of file class.ilExcel.php.
Referenced by ilDclBaseRecordFieldModel\getValueFromExcel(), ilDclStandardField\getValueFromExcel(), and ilDclTextRecordFieldModel\getValueFromExcel().
Here is the caller graph for this function:| ilExcel::getColumnCoord | ( | int | $a_col | ) |
Get column "name" from number.
Definition at line 384 of file class.ilExcel.php.
Referenced by ilSumScoreTableGUI\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), assClozeTest\setExportDetailsXLS(), assFileUpload\setExportDetailsXLS(), assFormulaQuestion\setExportDetailsXLS(), assImagemapQuestion\setExportDetailsXLS(), assKprimChoice\setExportDetailsXLS(), assLongMenu\setExportDetailsXLS(), assMultipleChoice\setExportDetailsXLS(), assNumeric\setExportDetailsXLS(), assOrderingQuestion\setExportDetailsXLS(), assQuestion\setExportDetailsXLS(), assSingleChoice\setExportDetailsXLS(), and assTextQuestion\setExportDetailsXLS().
Here is the caller graph for this function:| ilExcel::getColumnCount | ( | ) |
Returns the number of columns the sheet contains.
Definition at line 376 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 550 of file class.ilExcel.php.
| ilExcel::getSheetAsArray | ( | ) |
Returns the active sheet as an array.
Definition at line 368 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 | ( | ) |
Get valid file formats.
Definition at line 97 of file class.ilExcel.php.
Referenced by setFormat().
Here is the caller graph for this function:| ilExcel::loadFromFile | ( | string | $filename | ) |
Loads a spreadsheet from file.
Definition at line 85 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 585 of file class.ilExcel.php.
|
protected |
Definition at line 223 of file class.ilExcel.php.
References $lng.
|
protected |
| ilDateTime | $a_value |
Definition at line 208 of file class.ilExcel.php.
References ilDateTime\get(), IL_CAL_DATE, and IL_CAL_DATETIME.
Here is the call graph for this function:
|
protected |
Prepare workbook for storage/delivery.
Definition at line 414 of file class.ilExcel.php.
|
protected |
Definition at line 230 of file class.ilExcel.php.
|
protected |
Prepare value for cell.
| mixed | $a_value |
| InvalidArgumentException |
Definition at line 184 of file class.ilExcel.php.
Referenced by ilAssExcelFormatHelper\setCell(), and ilAssExcelFormatHelper\setCellByCoordinates().
Here is the caller graph for this function:| ilExcel::sendToClient | ( | string | $a_file_name | ) |
Send workbook to client.
PhpOffice\PhpSpreadsheet\Writer\Exception
Definition at line 440 of file class.ilExcel.php.
References ilFileDelivery\deliverFileAttached(), and ilFileUtils\ilTempnam().
Here is the call graph for this function:| ilExcel::setActiveSheet | ( | int | $a_index | ) |
PhpOffice\PhpSpreadsheet\Exception
Definition at line 150 of file class.ilExcel.php.
| ilExcel::setBold | ( | string | $a_coords | ) |
Set cell(s) to bold.
Definition at line 491 of file class.ilExcel.php.
Referenced by ilSumScoreTableGUI\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), ilLPProgressTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), assClozeTest\setExportDetailsXLS(), assFileUpload\setExportDetailsXLS(), assFormulaQuestion\setExportDetailsXLS(), assImagemapQuestion\setExportDetailsXLS(), assKprimChoice\setExportDetailsXLS(), assLongMenu\setExportDetailsXLS(), assMultipleChoice\setExportDetailsXLS(), assNumeric\setExportDetailsXLS(), assOrderingQuestion\setExportDetailsXLS(), assSingleChoice\setExportDetailsXLS(), assTextQuestion\setExportDetailsXLS(), 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 |
||
| ) |
Toggle cell(s) borders.
Definition at line 523 of file class.ilExcel.php.
| 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.
Referenced by ilDclBaseRecordFieldModel\fillExcelExport(), ilDclTextRecordFieldModel\fillExcelExport(), ilDclTextSelectionRecordFieldModel\fillExcelExport(), ilBookingReservationsTableGUI\fillHeaderExcel(), ilSCORM2004TrackingItemsTableGUI\fillHeaderExcel(), ilSCORMTrackingItemsTableGUI\fillHeaderExcel(), ilSumScoreTableGUI\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), ilLPProgressTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), ilDclBaseFieldModel\fillHeaderExcel(), ilDclStandardField\fillHeaderExcel(), ilDclTextFieldModel\fillHeaderExcel(), ilLPTableBaseGUI\fillMetaExcel(), ilDclBaseRecordModel\fillRecordFieldExcelExport(), ilBookingReservationsTableGUI\fillRowExcel(), ilPollAnswerTableGUI\fillRowExcel(), ilPollUserTableGUI\fillRowExcel(), ilSCORM2004TrackingItemsTableGUI\fillRowExcel(), ilSCORMTrackingItemsTableGUI\fillRowExcel(), ilSumScoreTableGUI\fillRowExcel(), ILIAS\MyStaff\ListCertificates\ilMStListCertificatesTableGUI\fillRowExcel(), ILIAS\MyStaff\ListCompetences\Skills\ilMStListCompetencesSkillsTableGUI\fillRowExcel(), ilMStListCoursesTableGUI\fillRowExcel(), ILIAS\MyStaff\ListUsers\ilMStListUsersTableGUI\fillRowExcel(), ilMStShowUserCoursesTableGUI\fillRowExcel(), ilTable2GUI\fillRowExcel(), ilLPObjectStatisticsDailyTableGUI\fillRowExcel(), ilLPObjectStatisticsTableGUI\fillRowExcel(), ilLPObjectStatisticsTypesTableGUI\fillRowExcel(), ilLPProgressTableGUI\fillRowExcel(), ilTrMatrixTableGUI\fillRowExcel(), ilTrObjectUsersPropsTableGUI\fillRowExcel(), ilTrSummaryTableGUI\fillRowExcel(), ilTrUserObjectsPropsTableGUI\fillRowExcel(), and ilUserLPTableGUI\fillRowExcel().
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 | $a_values | |
| string | $a_top_left | |
| mixed | $a_null_value | Value in source array that stands for blank cell |
Definition at line 334 of file class.ilExcel.php.
References $cols.
| ilExcel::setCellByCoordinates | ( | $a_coords, | |
| $a_value | |||
| ) |
Set cell value by coordinates.
| string | $a_coords | Coordinate of the cell, eg: 'A1' |
| mixed | $a_value |
Reimplemented in ilAssExcelFormatHelper.
Definition at line 257 of file class.ilExcel.php.
| ilExcel::setColors | ( | string | $a_coords, |
| string | $a_background, | ||
| string | $a_font = null |
||
| ) |
Set cell(s) colors.
Definition at line 499 of file class.ilExcel.php.
Referenced by 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.
| 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 393 of file class.ilExcel.php.
| ilExcel::writeToFile | ( | string | $a_file | ) |
Save workbook to file.
PhpOffice\PhpSpreadsheet\Writer\Exception
Definition at line 468 of file class.ilExcel.php.
| ilExcel::writeToTmpFile | ( | ) |
PhpOffice\PhpSpreadsheet\Writer\Exception
Definition at line 479 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.
|
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.