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

[Solved] Export to Excel

2 Answers 173 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ro
Top achievements
Rank 1
Ro asked on 09 Mar 2015, 01:09 PM
Hi,

I want to export the data of the grid to excel.

my data is displayed from right to left,
how can I export it rtl?

Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 11 Mar 2015, 07:26 AM

Hello Ro,

 

Here is a demo which shows how to customize the Excel sheet for RTL languages: http://dojo.telerik.com/@korchev/obUlI

 

The important code is the excelExport handler:

 

        excelExport: function(e) {
          var sheet = e.workbook.sheets[0];
          for (var i = 0; i < sheet.rows.length; i++) {
            sheet.rows[i].cells.reverse();    
            for (var ci = 0; ci < sheet.rows[i].cells.length; ci++) {
              sheet.rows[i].cells[ci].hAlign = "right";
            }
          }
        }

 

Regards,
Atanas Korchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ro
Top achievements
Rank 1
answered on 11 Mar 2015, 09:56 AM
Thanks a lot, it works perfectly!
Tags
Grid
Asked by
Ro
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Ro
Top achievements
Rank 1
Share this question
or