Does "ExportToWord()" supports writing out a file to a given stream?

1 Answer 8 Views
AJAX and Web 2.0
Sharanya
Top achievements
Rank 1
Sharanya asked on 17 Jun 2021, 12:46 PM
Is there any alternative method or supported property for "GridTableView. ExportToWord()" method so that we can write out the file to the provided stream rather than directly streaming it back to the user via the HTTP response.

1 Answer, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 22 Jun 2021, 08:56 AM

Hi Sharanya,

By default, the Export functionalities return the file to download. If you would like to save the content to a file, then you can access the output in the OnGridExporting event, save it to the disk and end the Response.

Here is a Knowledge Base article that gets the HTML-based Word content, converts it to DOCX then returns the file to the Response: xport HTML content into Docx.

So instead of returning the file to download, you can save the output to the disk. After that, you can End the response.

Regards,
Attila Antal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
AJAX and Web 2.0
Asked by
Sharanya
Top achievements
Rank 1
Answers by
Attila Antal
Telerik team
Share this question
or