10 Answers, 1 is accepted
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
Thanks
Aaron
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
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")';
}
}
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
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
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
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
This is what worked for me:
row.cells[0].formula = '=HYPERLINK("http:www.google.com","Click for Google")';
However, I will say Excel's 2016's security around hyperlinks is hideous and they don't even display until you get the document out of "Protected View". And then when the user clicks on the link they get a warning that there may be a virus....but this works...
Brian,
This was many years ago when you posted this, but helped me out greatly. Thanks!
Hello,
I was working on the same functionnality today and based on your sample and ideas, I've made a generic Excel export handler which will convert all column with a template hyperlink to an Excel hyperlink formula. If you have any interest you can find my implementation here : http://dojo.telerik.com/@Alain/ACUVa/2
Best regards,
Alain