Hi @Nara,
I saw your workflow everything is correct other than Invoke method. Why do you need an array or list to export data from one table to another. Please comment it out.
To sort datatable you may refer Uipath - Sort Datatable
Also I have attached my workflow for reference.test123 (2).zip (15.3 KB)