How to export all data without field - Excel Export

0 Answers 74 Views
Excel Export General Discussions
alex
Top achievements
Rank 1
Iron
Veteran
alex asked on 27 Jul 2021, 02:13 PM | edited on 27 Jul 2021, 02:16 PM

I would like to export all the data without defining the individual fields

This is my html code:

<button type="button" class="k-button" (click)="save(excelexport)">
Export To Excel
</button>
<kendo-excelexport [data]="allDataExport" fileName="Products_export.xlsx" #excelexport></kendo-excelexport>

this is my ts code:


public save(component): void {
		const options = component.workbookOptions();
		const rows = options.sheets[0].rows;

		component.save(options);
}

This function returns empty excel but datasource(allDataExport) is not empty

the format of my datasource is this:


0:
  0: "product 1"
  1: "12"
  2: "0"
  3: "numeric"
1:
  0: "product 2"
  1: "12"
  2: "0"
  3: "numeric"
2:
  0: "product 3"
  1: "12"
  2: "0"
  3:: "numeric"
3:
  0: "product 4"
  1: "12"
  2: "0"
  3: "numeric"

 

No answers yet. Maybe you can help?

Tags
Excel Export General Discussions
Asked by
alex
Top achievements
Rank 1
Iron
Veteran
Share this question
or