How to get the filtered excel output in a datatable?

Thanks @aksh1yadav your solution worked out,

you keep helping people so below is one more way suggested by @ClaytonM