Add custom column to grid that can be exported

I want to add a column to sales order invoice grid, that should be exported as it is shown in the grid.The column is a calculated column, based on the row data, so there is no explicit database entry for the column value.

But the answers to those question either suggest to alter ConvertToCsv.php and ConvertToXml.php or are based on a database entry that is joined.

Altering one of the ConvertToXXX.php files in IMHO not the right way, since the generation and calculation of the column data has nothing to do with either csv or xml. Nor do I have da database entry, so the answer does not hold.

Currently I got the following solution, which shows the data in the grid but does not get exported:

In Magento core code in vendor/magento/module-sales/Ui/Component/DataProvider/Document.php they use a switch-case statement to alter some database values to export values. First, I don't know how to intercept/extend this behavior, and secondly, I don't like that switch-case statement, which does not quite adhere to the OCP.

So what is the recommended or best way to show data in the grid and get it exported (independent on which export format was chosen), in best case without doing it twice for grid and export separately.