Awesome Icons font missing in asp: Gridview Export to Excel

I have a Gridview that has some FontAwesome (fa-check) checkboxes, the problem is that when I export the Grid to Excel, these fields are empty. Moreover, at run time, the value of cell.Text is an empty string ("), so I can not effectively replace the text with" YES ", for example. I use the usual code for export (Stringwriter, HtmlTextWriter, and then a loop for each gridview row and TableCell)

Any tips on how to replace this when exporting?

PS: I could have duplicate / hidden columns with YES NO instead of Font Awesome icons and then hide and show them during export, but I'm looking for a more elegant way.

Any help appreciated

+4
source share
1 answer

Please check:

https://www.nuget.org/packages/EPPlus/

This is a more graceful way to export to XLS and has many ways to customize your export.

Also, since FA Fonts are font based ... including a link to your resource file, so excel can find the font you are trying to display?

0
source

All Articles