Export to Excel / CSV available for Data Grid from database + able to change file name dynamically - Mendix Forum

Export to Excel / CSV available for Data Grid from database + able to change file name dynamically

24

Strange thing that has been there for years: when selecting from data source = XPath the ‘Export to CSV’ and ‘Export to Excel’ buttons can be added to a data grid, but when selecting datasource = database they aren't. Not sure why you would then ever want to select datasource=database? I always go for XPath.

And two idea's already mentioned elsewhere as well:

  1. Please make it possible to change the name of the exported Excel file. This is a default customer requirement, generating an Excel with a relatable name.
  2. Obviously it should export to .xlsx as well, not to .xls
asked
2 answers

Hi Erwin,

You are right. Not sure how this relates to my idea, though? This distinction Mendix made between XPath / Database is from way back when offline wasn’t even supported. Perhaps now they should indeed make it a bit more explicit what selecting database versus XPath means. On that I agree :)

Created

Database and nanoflow data sources are the only data sources supported offline. If a list widget has a database data source in an offline application, the data will come from the database that is situated on the device. 

So building an offline app is the reason to select datasource = database, see https://docs.mendix.com/refguide/data-sources#list-widgets

For the naming idea I totally agree.

Created