Thank you for contacting Syncfusion support.
We already have samples in our dashboard regarding your requirement. Could you please refer the below location,
Path Location: \{installed location}\Users \{Users.Login}\AppData\Local\Syncfusion\EssentialStudio\{installed Syncfusion ES build version}\WPF\SfGrid.WPF\Samples\TreeGrid\ExcelExportingDemo
Here, we have attached the Exporting to excel sample for SfTreeGrid in the below location. Could you please refer to it.
Please let us know if you have any other questions.
Regards,
Muthukumar K