Kendo grid for angular cannot export index column to excel
NickName:Traly Ask DateTime:2021-01-19T14:21:20

Kendo grid for angular cannot export index column to excel

I'm using angular 10 with kendo, now I have the problem with export excel from kendo grid, I html can preview normally, but when export as excel it have no id field. here is my code

html

<kendo-grid [kendoGridBinding]="products" [height]="400">
  <ng-template kendoGridToolbarTemplate>
    <button type="button" kendoGridExcelCommand icon="file-excel">
      Download Excel
    </button>
  </ng-template>
  <kendo-grid-column title="id">
    <ng-template kendoGridCellTemplate let-rowIndex="rowIndex">
      {{ rowIndex + 1 }}
    </ng-template>
  </kendo-grid-column>
  <kendo-grid-column field="pname" title="Product name"></kendo-grid-column>
  <kendo-grid-excel fileName="Products.xlsx"></kendo-grid-excel>
</kendo-grid>

ts

import { Component } from '@angular/core';
import { aggregateBy } from '@progress/kendo-data-query';
import { productList } from './products';

@Component({
    selector: 'my-app',
    templateUrl: 'app.component.html'
})
export class AppComponent {
    products = productList;
}

productList

export const productList = [
  { pname: 'Coca-Cola'},
  { pname: 'Sprite'},
  { pname: 'Pepsi'},
  { pname: 'Red Bull'},
  { pname: 'Fanta'},
  { pname: 'Olate'},
  { pname: 'Boos-trong'},
  { pname: 'Karabao'},
  { pname: 'M150'}
];

and here is my code in stackbiz

Please help to solve this problem, Thank in advance.

Copyright Notice:Content Author:「Traly」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/65786408/kendo-grid-for-angular-cannot-export-index-column-to-excel

More about “Kendo grid for angular cannot export index column to excel” related questions

Kendo grid for angular cannot export index column to excel

I'm using angular 10 with kendo, now I have the problem with export excel from kendo grid, I html can preview normally, but when export as excel it have no id field. here is my code html &lt;kendo-...

Show Detail

Kendo UI Angular 2 Grid Excel Export

I'm trying to add excel export functionality to Kendo UI angular 2 grid, but getting an error while the angular 2 app loads: Can't bind to 'toolbar' since it isn't a known property of 'kendo-grid'.

Show Detail

Unable to export to excel whole grid data in kendo grid in angular 6

Hi i am trying to use the export to excel feature of the kendo grid in angular Following is my html code HTML &lt;button type="button" kendoGridExcelCommand icon="file-excel"&gt;Export to Excel&...

Show Detail

Kendo grid export to excel and hide few column in excel

In .Net MVC 5 angular js, How to Export kendo grid data to excel with few column. i dont want to export all columns which are shown in the grid.

Show Detail

Kendo Grid for Angular 2 Excel export date formatting

When we try to export the grid data from Kendo UI Grid for Angular, One of the grid columns (Date column) doesn't format the actual date value. Here is my code. &lt;kendo-excelexport [data]="produ...

Show Detail

Kendo Grid for Angular 2 Features

I am currently trying to move from Angular 1.5 to Angular 2 and we are using Kendo Grid features extensively. I have a list of features which I need for converting to Angular 2 - Multi Column Hea...

Show Detail

Kendo Grid Export To Excel Save to a specific location

I am using angular 7 with kendo grid. When clicking export to excel, I need to save that file to a specific location in my PC. Is it possible with kendo grid export to excel?

Show Detail

Kendo Grid Export To Excel Currency formatting

I am trying to export my Kendo grid to excel. It works fine except the formatting is missing. I think it is because I am using a template. The Telerik documentation explicitly states: To format...

Show Detail

Exporting Angular Kendo UI Grid to Excel

I have a project where I using the Angular Kendo UI Grid and would like to be able to export the data to an excel document. I have looked at the ng-grid csv export but it appears one is required to...

Show Detail

Kendo grid export to excel -Right to left support

I am using Kendo grid for Angular js and export the content to excel using client side export feature provided by Kendo . I want the same feature to be supporting RTL . While exporting to excel , i

Show Detail