Search code examples
excelgridsyncfusion

How to put column header without data when export to Excel Syncfusion grid in ASP.NET Core


I want to put column header without data.

If I have grid like this, I want to print with out Item Code's data:

enter image description here

like this Excel:

enter image description here


Solution

  • After reviewing your query, we could see that you like to export the column without data. You can achieve your requirement by using the excelQueryCellInfo event of Grid. Please refer the below code example and API for more information.

    enter image description here

    API: https://ej2.syncfusion.com/documentation/api/grid/#excelquerycellinfo

    Screenshot:

    enter image description here enter image description here