0

How to create kendo grid with Kendo-Angular with export: I have kendo grid with columns. The columns have template. When I export grid to excel file the columns with template doesn't show

<kendo-grid [data]="dataSource"
            [sortable]="true"
            [pageable]="false"
            [filterable]="false"
            [selectable]="false">
  <ng-template kendoGridToolbarTemplate>
    <button type="button" kendoGridExcelCommand icon="file-excel"></button>
  </ng-template>
  <kendo-grid-column title="Name">
     <ng-template kendoGridCellTemplate let-dataItem>
        <span></span>
     </ng-template>
  </kendo-grid-column>
  <kendo-grid-column title="Category">
     <ng-template kendoGridCellTemplate let-dataItem>
        <span [innerHtml]="selectedProduct?.name"></span>
     </ng-template>
  </kendo-grid-column>
</kendo-grid>
theduck
  • 2,589
  • 13
  • 17
  • 23
Federico
  • 342
  • 8
  • 30

1 Answers1

2

Templates are not evaluated and exported to the Excel file:

DOCS

You can customize the exported workbook content and cell layout as demonstrated in the following example:

EXAMPLE

topalkata
  • 2,028
  • 2
  • 12
  • 13