Well the most flexible way is to use the excel exporter from the marketplace: https://docs.mendix.com/appstore/modules/excel-exporter#1-introduction
https://marketplace.mendix.com/link/component/726
You can also create a datagrid and directly export all the columns using an export to csv or excel button.