This sample show cases how to freeze header row in exported excel file in WPF DataGrid (SfDataGrid).
You can freeze the header row in the exported Excel sheet using FreezePanes method in IRange interface in DataGrid.
//Select freeze pane range
//To freeze a row or column, the selected range should be next to the row or column.
IRange range = worksheet[2, 1];
//Create freeze pane in first row
range.FreezePanes();Note: Once you run the sample exported excel file saved inside the bin folder.
Take a moment to peruse the WPF DataGrid - Excel Exporting documentation, where you can find about DataGrid excel exporting with code examples.
Visual Studio 2015 and above versions
