I have a lot of WPF Windows with syncfusion sfDataGrid and I created a user control with a export to excel button to use in all the forms:
XAML: