Write the data table to excel sheet based on if conditions

@ppratz

Check below post for your reference how you can write to datatable

Hope this helps you

Thanks