Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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'.

Here is the code snippet I'm using:

<kendo-grid [data]="gridView" [height]="700" [pageSize]="pageSize"
                        [toolbar]="['excel']" 
                        [excel]="{fileName: 'Reprocessingdetails.xlsx'}"
                        [skip]="skip"
                          [pageable]="{
                            info: true,
                            type: 'input',
                            pageSizes: false,
                            previousNext: true
                          }"
                          [scrollable]="'none'"
                          (pageChange)="pageChange($event)"
                          [sortable]="{ mode: 'single', allowUnsort: true }"
                          [sort]="sort"
                          (sortChange)="reprocessingResultsSortChange($event)"
                        >
                <kendo-grid-column field="isSelected" title="Select">
                    <template kendoCellTemplate let-dataItem>
                        <input type="checkbox" [(ngModel)]="dataItem.isSelected" />
                    </template>
                </kendo-grid-column>
                <kendo-grid-column field="reprocessingType" title="Reprocessing Type">
                </kendo-grid-column>


            </kendo-grid>

Excel export functionality wasn't mentioned in the roadmap, so is it fair to assume it is already present? If so, how do I make the above snippet work? any help?

like image 438
Christopher Vinod Avatar asked Dec 01 '16 12:12

Christopher Vinod


People also ask

How to Export Grid data to Excel in Angular?

The Grid provides options for exporting its data to Excel. To enable the Excel export, import the ExcelModule and add the kendo-grid-excel component to the Kendo UI Grid for Angular. To initiate the export, use the kendoGridExcelCommand directive or the saveAsExcel method.

Can I use Kendo UI Angular for free?

Yes, you can. As of the 2017 R1 release, you can include the Kendo UI components for jQuery in Angular applications.

Is Kendo UI for Angular open source?

Kendo UI Core is the only Kendo framework open-source.

What is Kendo UI for Angular?

Kendo UI for Angular is a separate suite of native Angular 2 UI components. The Kendo UI for Angular Roadmap page provides information about the development plans of the team with regard to new components and features. The Telerik blogs are an additional source for the latest updates on Kendo UI for Angular.


1 Answers

Excel Export is now an official feature of the Kendo UI Grid. It can also be used on its own, as a non-visual component for generating XLSX files.

like image 103
Tsvetomir Tsonev Avatar answered Oct 29 '22 08:10

Tsvetomir Tsonev