When you use UiPath.Excel.Activities.WriteRange activity with AddHeaders checked, the headers are not those in OutputDataTable produced string when you set a DataColumn.Expression propertie.
Could you please make the headers produced by WriteRange the same are those produced by OutputDataTable? If I had to chose, I’ll pick DataColumn.Caption property as header.
You’ll find an example as attachment. You’ll need UiPath.Excel.Activities to run it.