How to export to excel with hyper link

2 posts, 0 answers
  1. Russell
    Russell avatar
    1 posts
    Member since:
    Apr 2013

    Posted 28 Aug 2017 Link to this post

    Hi,

    I used this follow function to export my grid to Excel format, while my data source(a store procedure) has hyperlink inside.

    How can I just export the grid without hyperlink by setting some configurations?

    aspx file

    <asp:GridView ID="ExcelGridView" runat="server" BorderStyle="None"  GridLines="Both" Visible="False"  HeaderStyle-Font-Bold="true" HeaderStyle-BackColor="LightGray" OnRowDataBound="ExcelGridView_RowDataBound"></asp:GridView>

     

     

    cs file

    System.Data.DataTable data_table = ADOHelper.GetDataTable(ConfigurationManager.ConnectionStrings["Ligx_4_DB"].ConnectionString, query, null);
    ExcelGridView.DataSource = data_table;
    ExcelGridView.DataBind();
    ExcelGridView.Visible = true;
    Response.ClearContent();
    string attachment = "attachment; filename=ExcelDownload.xls";
    Response.AddHeader("Content-disposition", attachment);
    Response.ContentType = "xls";

     

  2. Eyup
    Admin
    Eyup avatar
    3825 posts

    Posted 31 Aug 2017 Link to this post

    Hello Russell,

    I've already replied to your query in the formal support ticket. I suggest that we continue our technical conversation on the mentioned thread.

    Regards,
    Eyup
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top