Export grid to excel cells with hyperlink

9 posts, 0 answers
  1. Hajrija
    Hajrija avatar
    11 posts
    Member since:
    Oct 2014

    Posted 05 Feb 2015 Link to this post

    Hi, 

    is there any way to export excel grid and to define for each cell hyperlink? 
    Currently cell values are web addresses but not hyperlink.

    Thanks
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 09 Feb 2015 Link to this post

    Hello Hajrija,

    Excel export functionality of the Grid exports only the data values (directly from the data source). If you would like to modify the output values and format them, then you can use the excelExport event and modify the result set before it is passed to the OOXML parser. Please refer to this "How-to" demo that demonstrates the aforementioned cell modification.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Aaron
    Aaron avatar
    2 posts
    Member since:
    Jan 2014

    Posted 05 Mar 2015 in reply to Georgi Krustev Link to this post

    I am also interested in this functionality.   When I use the method referred to in the "How to" above, the resulting Excel cells contain the full text of the Excel HYPERLINK function, but it isn't a real hyperlink.   Is there something I am missing?

    Thanks
    Aaron
  5. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 09 Mar 2015 Link to this post

    Hi,

    Excel doesn't support rendering of HTML cell values. This is why the Kendo UI grid doesn't use the column template during Excel export.

    Regards,
    Atanas Korchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Aaron
    Aaron avatar
    2 posts
    Member since:
    Jan 2014

    Posted 16 Mar 2015 in reply to Atanas Korchev Link to this post

    Thank you for your reply Atanas.    I'm not actually trying to get the HTML to render within the cell, I just need a clickable link using the Excel hyperlink function (please see the attached file).  

    Here is the code that I am using.   When I open the resulting file, the cell contains the literal text of the hyperlink function.   Am I trying to do something that isn't currently possible?


            excelExport: function(e) {
              var sheet = e.workbook.sheets[0];
             
              for (var i = 1; i < sheet.rows.length; i++) {
                var row = sheet.rows[i];
                row.cells[0].value = '=HYPERLINK("http:www.google.com","Click for Google")';
              }
            }

  7. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 18 Mar 2015 Link to this post

    Hello Aaron,

    You are right. The Kendo UI Grid Excel export doesn't currently support hyperlinks. It can export JavaScript primitive values - String, Number, Date, Boolean. You can also set the background, foreground, font, font size, bold, italic, underline and alignment. The full list of supported cell options is available here.

    Feel free to open a new feature request in our feedback portal.

    Regards,
    Atanas Korchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  8. DVS InteleStream
    DVS InteleStream avatar
    20 posts
    Member since:
    Oct 2009

    Posted 27 May in reply to Atanas Korchev Link to this post

    I agree this would be very useful.

    Here is the feature request link for this: http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/suggestions/8507851-hyperlink-support-when-exporting-kendo-grid-to-exc

  9. Teguh
    Teguh avatar
    6 posts
    Member since:
    May 2015

    Posted 26 Jul in reply to DVS InteleStream Link to this post

    Hi Both,

    I have similar query here. Is the new kendo ui export to excel already has this functionality? (hyperlink to excel)

    If not yet, is there any workaround? Thanks :)

     

    Warm regards, 

    TS

  10. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 28 Jul Link to this post

    Hello TS,

    I am afraid that the desired functionality is still not supported. I would not be able to provide a feasible workaround for the time being.

    I would suggest you cast your vote for the feature request, as this would help to increase the interest to it.

    Regards,
    Georgi Krustev
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
Back to Top
Kendo UI is VS 2017 Ready