New to Telerik UI for Blazor? Download free 30-day trial

Exporting Grid's Image Column to Excel in Blazor

Environment

Product Grid for Blazor

Description

I want to export the Telerik Blazor Grid's column that displays images to an Excel file. The images are rendered in a Grid column template. How can I include the image column in the Excel export?

Solution

To export an image column from the Grid to Excel, follow these steps:

  1. Handle the Grid's OnAfterExport event to capture the Excel export output as a memory stream.
  2. Use the SpreadProcessing library to modify the Excel file. Similar to how the exported file is customized here - Custom cell formatting of the exported file with RadSpreadProcessing. The SpreadProcessing library supports inserting images in the cells.

If you encounter any questions regarding the usage of the Document Processing libraries, contact the DocumentPorcessing team.

See Also

In this article