Add grouping and aggregation to Excel export

Export to Excel function exports all the data from a screen. By creating a custom view you can select which columns are exported. It would be useful if also grouping and aggregation settings including the counts were transferred to the resulting Excel file, so the data layout would match the client view.

@zcapkova please provide an example excel file