I have the following situation, a component with treelist where the column receives an array by ngTemplate referencing the field.
<kendo-treelist-column
*ngIf="!isHidden('progress')"
field="progress"
title="Progress"
[width]="320">
<ng-template kendoTreeListCellTemplate let-dataItem let-group="cellContext">
<app-okrprogress-bar
[showButtonOk]="true"
[value]="dataItem.progress.slice(-1)[0].value"
[valuePercentagel]="dataItem.progress.slice(-1)[0].value"
[showSlider]="!dataItem.contents ? true : false"
[showValue]="dataItem.typeProgress == 'Values' ? true : false"
[showChecbox]="dataItem.typeProgress == 'Boolean' ? true : false"
[stepSlider]="dataItem.typeProgress"
[viewValue]="dataItem?.values"
(newPercentageActive)="
changePercentage($event, group.viewItem.parent.data, dataItem)
"></app-okrprogress-bar>
</ng-template>
</kendo-treelist-column>
Now I have to export this column in excel, but the field only waits for a simple variable or objects.
<kendo-treelist-excel>
<kendo-excelexport-column fild="keyName" title="Objective"></kendo-excelexport-column>
<kendo-excelexport-column fild="progress.slice(-1)[0].value" title="Progress"></kendo-excelexport-column>
<kendo-excelexport-column fild="status.status" title="Status"></kendo-excelexport-column>
</kendo-treelist-excel>
I did some tests of different calling modes but none of the results were effective.
This is the interface:
interface ObjectiveResult {
keyName: string;
progress: Progress[];
status?: Status;
}
interface Progress {
value: number;
date: Date;
}
interface Status {
name: string;
color: string;
}
Current results: