The out of the box export to excel works only for the columns visible on the screen. In order to export additional columns you will have to use a custom microflow and export template.
This documentation might help:
https://docs.mendix.com/howto/integration/using-the-excel-exporter
As a workaround (?) you could also add the extra attributes as columns in the data grid and set the width to 0 (pixels).
These attributes are not visible on the screen then, but they are exportable to Excel.