Export to Excel

Two questions on the topic:

  1. When specifying the list of fields in the $select parameter, is there any way to alias the outputted data so say use something like "Field1 as MyData" within the $select value?
  2. I have a datagrid (grid0) which is displaying the data to be exported, I'm trying to get the export to have the same filtering and ordering as the datagrid. I found an old(ish) post that said for filtering, to set the $filter to ${grid0.Query.Filter} but, when I try and use this I get an error: "ERROR ReferenceError: grid0 is not defined".

Thanks!

Hi @markb,

Aliases are not supported by $select parameter. To apply the same filtering you can save the expression in LoadData event and use it in your export method - grid0.Query.Filter is related to Blazor DataGrid.

I've just published an article demonstrating the approach described in my previous post:

1 Like

That's great - thanks for doing that. I have the export working nicely now :smiley: