You can use any SSRS expression you want to control sorting. In the sort field you can click the Fx
button to go into the expression editor and use any SSRS expression to control formatting up to and including your own custom functions that you've added to your report.
When you export to another format then the order in which the data appears in the report is what would get exported. The report is rendered (which sets ordering) and then exported. Having said that I'm not sure whether interactive sorting would export correctly because the report is exported, not the current UI display AFAIK but honestly I've never had to export a report with interactive sorting enabled.