Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
webdatagrid export to excel still contains html markup

to all -

pretty new to the webdatagrid.  i have a export to excel option on one of my aspx pages which works well, but when the spreadsheet opens, the order number (which is a hyperlink template in the webgrid)  looks like this in the excel column:

<a id="WebDataGrid1_it0_0_HyperLink1" href="/Orders/edit/editOrder.asp?id=127277" target="_parent">127277</a> instead of just being the order number:  127277

how can i tell the webdatagrid to format column zero of the excel spreadsheet to just be the order number without the html markup?  any help would be appreciated.




No Data
  • 49378
    Suggested Answer

    Hello Emil,

    Thank you for posting in the community.

    In order to export only the desired information from a tepmlated column in WebDataGrid (or a column with injected html), a hidden column which holds the desired data for exporting may be used. Prior to exporting the link column is set to hidden and the hidden column containing the exporting data is made visible. Attached is a small sample illustrating this scenario in practice.

    Please let me know if this helps.

    WebDataGridExportLinkColumn (2).zip