This is a migrated thread and some comments may be shown as answers.

Trying to export to Excel from Data Grid - missing DemoFileExporter

2 Answers 134 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 13 Feb 2020, 08:29 PM

At this point, I'm a trial user.  I have been able to use a Data Grid in my Visual Studio Blazor project just fine.  Now I'm trying to add an export-to-Excel feature, similar to what is described here:

https://demos.telerik.com/blazor-ui/spreadprocessing/overview

I'm down to one build error.  The name DemoFileExporter cannot be found. 

DemoFileExporter.Save(JsRuntime, fileData, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "Locations.xlsx");

My guess is it is part of TelerikBlazorDemos.DocumentProcessing.  Is that right?  If so, I don't know where/how to get it.  Is there a Nuget package for it?  If not, how can I get it and add it to my Visual Studio project?

2 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Top achievements
Rank 1
answered on 13 Feb 2020, 08:47 PM

I found it.  During installation, it put a demo project onto my hard drive here:

C:\Program Files (x86)\Progress\Telerik UI for Blazor 2.7.1\demos

I opened that solution, found the few source files that were pertinent and copied them to my data grid project/solution.

0
Marin Bratanov
Telerik team
answered on 14 Feb 2020, 12:09 PM

Hi Steve,

For built-in excel export of the grid, Follow this page (my post from 13 Jan 2020 offers an example you can use as base to actually export the current data only too): https://feedback.telerik.com/blazor/1431614-export-grid-to-excel

Indeed, this particular class is part of our demos, as the exporting feature is not something we have out-of-the-box yet, this class in our demos is used for the generated documents through the DocumentProcessing Libaries we offer - the demo you are looking at generates a file behind the scenes from the same data that is shown in the grid.

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
Tags
General Discussions
Asked by
Steve
Top achievements
Rank 1
Answers by
Steve
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or