This is a migrated thread and some comments may be shown as answers.

Kendo Grid export to excel + Enhanced Textbox content

1 Answer 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
keyur
Top achievements
Rank 1
keyur asked on 08 Nov 2016, 10:20 AM

Hi,

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.

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 09 Nov 2016, 01:10 PM
Hello Keyur,

The described result is expected, as the Grid is making modifications on its  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.

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-excelExport

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

http://dojo.telerik.com/uPAtO

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

Regards,
Stefan
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.
 
Tags
Grid
Asked by
keyur
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or