Excel download example

Hi there, I'm trying to understand the online example for Excel/CSV downloads here

This seems to rely on some other services NorthwindService and a Query type. What are these? I was expecting to see some kind of generic Excel download feature that works with any grid and doesn't have any other dependencies. Maybe I don't understand what I'm looking at?

The export can export a data not DataGrid.

Makes sense that it's not dependent on the grid, but it seems to export only Northwind data -- because the Export method is part of NorthwindService. How does this help me export my own data?

The export is performed by the ExportController. You can call it from any service.

Do you mean an MVC controller called ExportController? Where is that in this example? Sorry, I'm finding everything about this example confusing.

The source code of the entire project is here:

Okay, now I understand what's going on :slight_smile:

Hello @adamfoneil.
I am trying to create a Excel document, and I also can't figure out the example. Did you manage to make it work?
I am stuck with the NorthwindService.export

Thanks in advance.

I did get it working. The blocker for me was that I was expecting to see some kind of Blazor-specific export component, but it's really just a standard MVC action that performs the actual file creation and download. The NorthwindService serves merely as a redirector to that MVC action. I wasn't familiar with the spreadsheet library used in their example. I use ClosedXML instead, but that's neither here nor there.

@adamfoneil thanks for your kind reply.