|
ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
|
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 | ( | ) |
PhpOffice\PhpSpreadsheet\Exception
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 569 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 596 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 582 of file class.ilExcel.php.
| ilExcel::getCell | ( | int | $a_row, |
| int | $a_col | ||
| ) |
Returns the value of a cell.
Definition at line 363 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 390 of file class.ilExcel.php.
Referenced by ilSumScoreTableGUI\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), and ilTrUserObjectsPropsTableGUI\fillHeaderExcel().
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.
| 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.
References FORMAT_BIFF, and FORMAT_XML.
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 591 of file class.ilExcel.php.
|
protected |
Definition at line 220 of file class.ilExcel.php.
References $lng.
|
protected |
| ilDateTime | $a_value |
Definition at line 205 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 420 of file class.ilExcel.php.
|
protected |
Definition at line 227 of file class.ilExcel.php.
|
protected |
Prepare value for cell.
| mixed | $value |
| InvalidArgumentException |
Definition at line 184 of file class.ilExcel.php.
| ilExcel::sendToClient | ( | string | $a_file_name | ) |
Send workbook to client.
PhpOffice\PhpSpreadsheet\Writer\Exception
Definition at line 446 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 497 of file class.ilExcel.php.
Referenced by ilSumScoreTableGUI\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), ilLPProgressTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), and ilTrUserObjectsPropsTableGUI\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 |
||
| ) |
Toggle cell(s) borders.
Definition at line 529 of file class.ilExcel.php.
| 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.
Referenced by ILIAS\Test\Logging\TestLogViewer\addRowsFromLogs(), 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(), ILIAS\MyStaff\ListCertificates\ilMStListCertificatesTableGUI\fillRowExcel(), ILIAS\MyStaff\ListCompetences\Skills\ilMStListCompetencesSkillsTableGUI\fillRowExcel(), ILIAS\MyStaff\ListUsers\ilMStListUsersTableGUI\fillRowExcel(), ilBookingReservationsTableGUI\fillRowExcel(), ilMStListCoursesTableGUI\fillRowExcel(), ilMStShowUserCoursesTableGUI\fillRowExcel(), ilPollAnswerTableGUI\fillRowExcel(), ilPollUserTableGUI\fillRowExcel(), ilSCORM2004TrackingItemsTableGUI\fillRowExcel(), ilSCORMTrackingItemsTableGUI\fillRowExcel(), ilSumScoreTableGUI\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<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.
| 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.
| 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.
|
protected |
Set date format of cell.
| Cell | $a_cell | |
| mixed | $a_value |
Definition at line 246 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 399 of file class.ilExcel.php.
| ilExcel::writeToFile | ( | string | $a_file | ) |
Save workbook to file.
PhpOffice\PhpSpreadsheet\Writer\Exception
Definition at line 474 of file class.ilExcel.php.
| ilExcel::writeToTmpFile | ( | ) |
PhpOffice\PhpSpreadsheet\Writer\Exception
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.
|
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.
Referenced by getValidFormats().
| const ilExcel::FORMAT_XML = 'Xlsx' |
Definition at line 36 of file class.ilExcel.php.
Referenced by getValidFormats(), and ILIAS\Test\ExportImport\ResultsExportExcel\write().