exporting hyperlink to excel

2 posts, 0 answers
  1. Dan
    Dan avatar
    4 posts
    Member since:
    Jun 2011

    Posted 18 May Link to this post


    I have read the other threads, and I am not having much success. I can export a URL as text, but I haven't been able to get it to show up as a clickable link in an xlsx file. Can someone please help me? Below are the examples preceded by a note about its behavior:


    [ This one doesn't show anything in the text cell. I read on an old post that this is to be expected. ]
    <telerik:GridHyperLinkColumn AllowFiltering="False" AllowSorting="False" Visible="true"
     Text="View Page"
        <HeaderStyle Width="50px" HorizontalAlign="Center"></HeaderStyle>

    [This displays the cell as source html.]
    <telerik:GridTemplateColumn HeaderText="View1.0" >
            <a href="https://www.google.com">Click here to open the folder</a>
        <HeaderStyle Width="200px" HorizontalAlign="Center"></HeaderStyle>

    [This displays the cell as source html.]
    <telerik:GridTemplateColumn HeaderText="View1.1" >
            <a href="https://www.google.com">https://www.google.com</a>
        <HeaderStyle Width="200px" HorizontalAlign="Center"></HeaderStyle>


    [This displays the link as a text string.]
    <telerik:GridTemplateColumn HeaderText="View1.2" >
        <HeaderStyle Width="200px" HorizontalAlign="Center"></HeaderStyle>

    [This displays the data field as text string]
    <telerik:GridBoundColumn Visible="false" SortExpression="directURL" HeaderText="View Specimen" HeaderButtonType="TextButton"
                             DataField="directURL" Exportable="True" UniqueName="hiddenDirectURL" >
        <HeaderStyle Width="200px" HorizontalAlign="Center"></HeaderStyle>

    Any suggestions would be appreciated. Thanks.



  2. Doncho
    Doncho avatar
    15 posts

    Posted 21 May Link to this post

    Hi Dan,

    Thank you for the samples provided!

    When the required export format is XLSX, some additional customization of the export is needed.

    Exporting to XLSX format is based on the TelerikProcessing Libraries. Therefore, the RadSpreadProcessing library could be the best place to look for an answer. Here are some articles that may help in solving the case:

    On the other hand, when exporting to Excel HTML format exporting links is done automatically. You can try the sample project provided in this forum thread - Editting GridHyperLinkColumn NavigateUrl in codebehind

    Please go through the suggested articles and let me know if they help.

    Kind regards,
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top