Kendo Grid export to excel + Enhanced Textbox content

2 posts, 0 answers
  1. keyur
    keyur avatar
    1 posts
    Member since:
    Nov 2016

    Posted 08 Nov 2016 Link to this post


    I am binding Kendo Grid with SharePoint Rest Api. The SharePoint List contains a Column that facilitates rich textbox features(formatting features). While displaying content on Kendo Grid i have set "encoded : false" property, this makes it perfect in grid. But when i try to export content to excel it exports html tags into excel. Can any one help me with this?

    thanks in advance.


  2. Stefan
    Stefan avatar
    2241 posts

    Posted 09 Nov 2016 Link to this post

    Hello Keyur,

    The described result is expected, as the Grid is making modifications on its td elements in order to show the unencoded data, but the data itself is not modified.

    When the Grid is exported to Excel, we actually export the Grid data which in this scenarios is a string containing HTML tags.

    I can suggest using the excelExport event of the Grid to modify the data which will be exported to Excel.

    I made a Dojo example demonstrating how to access all of the cells in a specific column and set them a new value:

    I hope this will help you to achieve the desired result.

    Telerik by Progress
    Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
Back to Top