Свойство | Тип | Описание | |
---|---|---|---|
$columns_dict | array | dictionary value: column name as in extensions/ki_export/templates/scripts/main.php key: true if active, else false | |
$customTimeformat | string | strftime format string for fields of type time | |
$exportData_arr | array | the data rows to be exported | |
$kga | array | Kimai Global Array |
Свойство | Тип | Описание | |
---|---|---|---|
$COLUMN_CONFIG | array | Column configuration:
|
|
$activeColumns_arr | array | contains names (as in $this->columns_dict) of active columns | |
$anySumsWereAdded | boolean | true, if there are any active columns with sums, else false | |
$dateFormat | string | excel format string for fields of type date | |
$sheet | PHPExcel_Worksheet | the first (and only) worksheet | |
$timeFormat | string | excel format string for fields of type time |
Метод | Описание | |
---|---|---|
render ( array $kga, array $exportData_arr, array $columns_dict, string $customTimeformat ) | generates an .xlsx file containing time sheets to be exported the file will be sent to the browser for download/viewing |
Метод | Описание | |
---|---|---|
addCellBorders ( ) | add cell borders | |
doLayouting ( ) | do layouting (cell borders, font styles, background colors, cell sizing, page setup) | |
excelAddr ( integer $x, integer $y ) : string | get excel field address by supplying coordinates (e.g. '1/1' becomes 'B2') | |
excelColumnAddr ( integer $n ) : string | get excel column letter by index (e.g. '2' becomes 'C') using this over PHPExcels built-in methods, because they are partly 1-based instead of 0-based | |
excelRange ( $x1, $y1, $x2, $y2 ) : string | get excel field range by supplying coordinates | |
formatDataRowsByType ( ) | cell formatting (number/text/date . | |
formatHeaders ( ) | format the headers (additional cell borders, background color, alignment) | |
formatSums ( ) | format the sums row if there are any sums (borders and background color) | |
initialize ( ) | initial PHPExcel settings; build $this->activeColumns_arr | |
renderExcel ( ) | renders the excel and sends it to the browser | |
writeDataRows ( ) | write the data rows for all active columns | |
writeHeaders ( ) | write the headers for all active columns | |
writeSums ( ) | write sums for active columns only if configured in self::$COLUMN_CONFIG |
protected doLayouting ( ) |
protected static excelColumnAddr ( integer $n ) : string | ||
$n | integer | column index |
Результат | string | excel column letter |
protected static excelRange ( $x1, $y1, $x2, $y2 ) : string | ||
Результат | string | excel field range |
protected formatDataRowsByType ( ) |
protected formatHeaders ( ) |
protected formatSums ( ) |
protected initialize ( ) |
public render ( array $kga, array $exportData_arr, array $columns_dict, string $customTimeformat ) | ||
$kga | array | Kimai Global Array |
$exportData_arr | array | the data rows to be exported |
$columns_dict | array | dictionary of columns: column name => active (true/false) |
$customTimeformat | string | strftime format string for fields of type time (for dates $this->kga['conf']['date_format_1'] will be used) |
protected renderExcel ( ) |
protected writeDataRows ( ) |
protected writeSums ( ) |
protected static array $COLUMN_CONFIG | ||
Результат | array |
protected array $activeColumns_arr | ||
Результат | array |
protected bool $anySumsWereAdded | ||
Результат | boolean |
public array $columns_dict | ||
Результат | array |
public string $customTimeformat | ||
Результат | string |
protected string $dateFormat | ||
Результат | string |
public array $exportData_arr | ||
Результат | array |
protected PHPExcel_Worksheet $sheet | ||
Результат | PHPExcel_Worksheet |
protected string $timeFormat | ||
Результат | string |