@ppratz
Check below post for your reference how you can write to datatable
Hope this helps you
Thanks