ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
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) | |
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=0, $pRow=1) | |
Get cell coordinate (e.g. More... | |
Data Fields | |
const | FORMAT_XML = "Excel2007" |
const | FORMAT_BIFF = "Excel5" |
Protected Member Functions | |
prepareValue ($a_value) | |
Prepare value for cell. More... | |
prepareDateValue (ilDateTime $a_value) | |
prepareBooleanValue ($a_value) | |
prepareString ($a_value) | |
setDateFormat (PHPExcel_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 | |
$workbook | |
$type | |
Definition at line 12 of file class.ilExcel.php.
ilExcel::__construct | ( | ) |
Constructor.
Definition at line 32 of file class.ilExcel.php.
References setFormat(), and workbook.
ilExcel::addSheet | ( | $a_name, | |
$a_activate = true |
|||
) |
Add sheet.
string | $a_name | |
bool | $a_activate |
Definition at line 90 of file class.ilExcel.php.
References array, setActiveSheet(), ilUtil\shortenText(), and workbook.
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel().
ilExcel::getCell | ( | $a_row, | |
$a_col | |||
) |
Returns the value of a cell.
int | $a_row | |
int | $a_col |
Definition at line 351 of file class.ilExcel.php.
References workbook.
ilExcel::getColumnCoord | ( | $a_col | ) |
Get column "name" from number.
int | $a_col |
Definition at line 381 of file class.ilExcel.php.
References PHPExcel_Cell\stringFromColumnIndex().
Referenced by ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilBookingReservationsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), and ilTable2GUI\fillHeaderExcel().
ilExcel::getColumnCount | ( | ) |
Returns the number of columns the sheet contains.
Definition at line 371 of file class.ilExcel.php.
References PHPExcel_Cell\columnIndexFromString(), and workbook.
ilExcel::getCoordByColumnAndRow | ( | $pColumn = 0 , |
|
$pRow = 1 |
|||
) |
Get cell coordinate (e.g.
"B2") for column and row number
int | $pColumn | |
int | $pRow |
Definition at line 573 of file class.ilExcel.php.
References PHPExcel_Cell\stringFromColumnIndex().
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel().
ilExcel::getSheetAsArray | ( | ) |
Returns the active sheet as an array.
Definition at line 361 of file class.ilExcel.php.
References workbook.
ilExcel::getSheetCount | ( | ) |
Returns number of sheets.
Definition at line 130 of file class.ilExcel.php.
References workbook.
ilExcel::getSheetTitle | ( | ) |
Return the current sheet title.
Definition at line 140 of file class.ilExcel.php.
References workbook.
ilExcel::getValidFormats | ( | ) |
Get valid file formats.
Definition at line 60 of file class.ilExcel.php.
References array.
Referenced by setFormat().
ilExcel::loadFromFile | ( | $filename | ) |
Loads a spreadsheet from file.
$filename |
Definition at line 47 of file class.ilExcel.php.
References $filename, PHPExcel_IOFactory\load(), and workbook.
|
protected |
bool | $a_value |
Definition at line 200 of file class.ilExcel.php.
References $lng.
Referenced by prepareValue().
|
protected |
ilDateTime | $a_value |
Definition at line 180 of file class.ilExcel.php.
References ilDateTime\get(), IL_CAL_DATE, IL_CAL_DATETIME, and PHPExcel_Shared_Date\stringToExcel().
Referenced by prepareValue().
|
protected |
Prepare workbook for storage/delivery.
Definition at line 412 of file class.ilExcel.php.
References format, setGlobalAutoSize(), and workbook.
Referenced by sendToClient(), and writeToFile().
|
protected |
string | $a_value |
Definition at line 211 of file class.ilExcel.php.
Referenced by prepareValue().
|
protected |
Prepare value for cell.
mixed | $a_value |
Definition at line 155 of file class.ilExcel.php.
References $lng, prepareBooleanValue(), prepareDateValue(), and prepareString().
Referenced by ilAssExcelFormatHelper\setCell(), setCell(), setCellArray(), ilAssExcelFormatHelper\setCellByCoordinates(), and setCellByCoordinates().
ilExcel::sendToClient | ( | $a_file_name | ) |
Send workbook to client.
string | $a_file_name |
Definition at line 442 of file class.ilExcel.php.
References ilMimeTypeUtil\APPLICATION__OCTET_STREAM, ilMimeTypeUtil\APPLICATION__VND_MS_EXCEL, ilMimeTypeUtil\APPLICATION__VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET, PHPExcel_IOFactory\createWriter(), ilFileDelivery\DIRECT_PHP_OUTPUT, format, prepareStorage(), and workbook.
ilExcel::setActiveSheet | ( | $a_index | ) |
Set active sheet.
int | $a_index |
Definition at line 119 of file class.ilExcel.php.
References workbook.
Referenced by addSheet().
ilExcel::setBold | ( | $a_coords | ) |
Set cell(s) to bold.
string | $a_coords |
Definition at line 503 of file class.ilExcel.php.
References workbook.
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel(), ilLPProgressTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilBookingReservationsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), and ilAssExcelFormatHelper\setFormattedExcelTitle().
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.
References $style, PHPExcel_Style_Border\BORDER_THIN, and workbook.
ilExcel::setCell | ( | $a_row, | |
$a_col, | |||
$a_value | |||
) |
Set cell value.
int | $a_row | |
int | $a_col | |
mixed | $a_value |
Definition at line 281 of file class.ilExcel.php.
References prepareValue(), setDateFormat(), PHPExcel_Cell_DataType\TYPE_NUMERIC, PHPExcel_Cell_DataType\TYPE_STRING, and workbook.
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel(), ilDclTextRecordFieldModel\fillExcelExport(), ilDclBaseRecordFieldModel\fillExcelExport(), ilSCORM2004TrackingItemsTableGUI\fillHeaderExcel(), ilSCORMTrackingItemsTableGUI\fillHeaderExcel(), ilDclTextFieldModel\fillHeaderExcel(), ilLPProgressTableGUI\fillHeaderExcel(), ilTrObjectUsersPropsTableGUI\fillHeaderExcel(), ilTrUserObjectsPropsTableGUI\fillHeaderExcel(), ilTrMatrixTableGUI\fillHeaderExcel(), ilBookingReservationsTableGUI\fillHeaderExcel(), ilTrSummaryTableGUI\fillHeaderExcel(), ilDclBaseFieldModel\fillHeaderExcel(), ilTable2GUI\fillHeaderExcel(), ilLPTableBaseGUI\fillMetaExcel(), ilDclBaseRecordModel\fillRecordFieldExcelExport(), ilPollAnswerTableGUI\fillRowExcel(), ilPollUserTableGUI\fillRowExcel(), ilUserLPTableGUI\fillRowExcel(), ilSCORM2004TrackingItemsTableGUI\fillRowExcel(), ilSCORMTrackingItemsTableGUI\fillRowExcel(), ilLPObjectStatisticsTypesTableGUI\fillRowExcel(), ilLPObjectStatisticsDailyTableGUI\fillRowExcel(), ilLPObjectStatisticsTableGUI\fillRowExcel(), ilLPProgressTableGUI\fillRowExcel(), ilTrObjectUsersPropsTableGUI\fillRowExcel(), ilTrUserObjectsPropsTableGUI\fillRowExcel(), ilTrMatrixTableGUI\fillRowExcel(), ilBookingReservationsTableGUI\fillRowExcel(), ilTrSummaryTableGUI\fillRowExcel(), ilTable2GUI\fillRowExcel(), and ilSurveyEvaluationGUI\parseResultsToExcel().
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 322 of file class.ilExcel.php.
References prepareValue(), and workbook.
ilExcel::setCellByCoordinates | ( | $a_coords, | |
$a_value | |||
) |
Set cell value by coordinates.
string | $a_coords | |
mixed | $a_value |
Definition at line 242 of file class.ilExcel.php.
References prepareValue(), setDateFormat(), PHPExcel_Cell_DataType\TYPE_NUMERIC, PHPExcel_Cell_DataType\TYPE_STRING, and workbook.
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 515 of file class.ilExcel.php.
References array, PHPExcel_Style_Fill\FILL_SOLID, and workbook.
Referenced by ilSurveyEvaluationGUI\exportResultsDetailsExcel(), ilSurveyEvaluationGUI\parseResultsToExcel(), and ilAssExcelFormatHelper\setFormattedExcelTitle().
|
protected |
Set date format.
PHPExcel_Cell | $a_cell | |
mixed | $a_value |
Definition at line 222 of file class.ilExcel.php.
References PHPExcel_Cell\getStyle().
Referenced by setCell(), and setCellByCoordinates().
ilExcel::setFormat | ( | $a_format | ) |
Set file format.
string | $a_format |
Definition at line 70 of file class.ilExcel.php.
References format, and getValidFormats().
Referenced by __construct().
|
protected |
Set all existing columns on all sheets to autosize.
Definition at line 389 of file class.ilExcel.php.
References $worksheet, and workbook.
Referenced by prepareStorage().
ilExcel::writeToFile | ( | $a_file | ) |
Save workbook to file.
string | $a_file | full path |
Definition at line 473 of file class.ilExcel.php.
References PHPExcel_IOFactory\createWriter(), format, prepareStorage(), and workbook.
ilExcel::writeToTmpFile | ( | ) |
Definition at line 486 of file class.ilExcel.php.
References $filename, PHPExcel_IOFactory\createWriter(), format, ilUtil\ilTempnam(), and workbook.
|
protected |
Definition at line 22 of file class.ilExcel.php.
|
protected |
Definition at line 17 of file class.ilExcel.php.
const ilExcel::FORMAT_BIFF = "Excel5" |
Definition at line 25 of file class.ilExcel.php.
const ilExcel::FORMAT_XML = "Excel2007" |
Definition at line 24 of file class.ilExcel.php.