I couldn't really find info how to set data table headers dynamically from text.
Thing is that I have dynamic number of headers I have to assign to data table, so I can't hardcode them.
Solution I found is to create a list variable of headers, then assign that list to data table headers using following syntax:
%{ ^List_Headers }%
Afterwards can add table data rows in similar way providing them as list variables.
Just make sure column count match.
Hope someone will find this useful.