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

Export to excel in IE9 doesn't work

5 Answers 120 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ying
Top achievements
Rank 1
ying asked on 06 Jan 2015, 09:06 PM
we are trying to use Kendo UI grid export to excel functionality in IE9,  but it doesn't work.

when we click on Export to Excel, it throws "POST" not supported error on server side. our datasource is remote URI, we have server side pagination,  but even if we switched to local static datasource,  Kendo seems still fire event to server. we wonder if anyone can help us  to resove this issue.

Thanks.

Here is our code snippet.

var list = [
{type:'a', id: '1', date:'09/11/2001',
submittedBy: 'Vin Diesel', submittedDate: '12/11/2001'},
{type:'b', id: '2', date:'11/02/2012',
submittedBy: 'Brad Pitt', submittedDate: '11/11/2012'},
{type:'c', id: '3', date:'06/05/2004',
submittedBy: 'Hugh Grant', submittedDate: '12/11/2004'}
];

var localList = new kendo.data.DataSource({
data: list,
pageSize: 2
});

$scope.onSearchClick = function(o) {
$("#grid").kendoGrid({

toolbar: ["excel"],
excel: {
fileName: "Kendo UI Grid Export.xlsx"
},
dataSource: localList,



pageable: true,
resizable: true,
pageSize:2,
sortable : {
mode : 'multiple'
},

columns: [
{ field: 'type', title: 'Type' },
{ field: 'id', title: 'Event ID' },
{ field: 'date', title: 'Date' },

{ field: 'submittedBy', title: 'Submitted By' },
{ field: 'submittedDate', title: 'Submitted Date' }
],
});

var grid = $("#grid").data("kendoGrid");
//grid.dataSource.read();
};

5 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 08 Jan 2015, 09:31 AM

Hello Ying,

In order to use the Excel export functionality in Internet Explorer 9 and below, you should define a proxyURL, which will be used to serve the file for the user.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
ying
Top achievements
Rank 1
answered on 08 Jan 2015, 03:38 PM
yes,  use proxyURL resolved the issue ,  THANKS!
0
Fouad
Top achievements
Rank 1
answered on 22 Jul 2015, 11:29 AM

I got the proxyURL and the forceProxy=true but when opening the file (.xlsx) I get the error "We found a problem with some content in "test.xlsx". Do you want to try to recover as much as we can? If you trust the source of the this workbook, click Yes".

So I opened the xlsx and found the problem is the sheet1.xml is actually renamed as sheet1.00.xml which makes Excel not recognize and throw the error (if I rename it to sheet1.xml the file opens fine).

This only happens in IE9. IE10+ and other browsers (tried the last versions of FF and Chrome) everything works fine, the file comes named as sheet1.xml and the xlsx opens correctly.

Is this a bug? Can I do something to get this to work on IE9?

 

Thanks

0
Dimiter Madjarov
Telerik team
answered on 24 Jul 2015, 08:25 AM

Hello Fouad,

We have not met the issue before. Could you send us small isolated runnable example (here or in a support ticket) that demonstrates it, so we could inspect it further?

I am looking forward to hearing from you.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Fouad
Top achievements
Rank 1
answered on 27 Jul 2015, 01:10 PM

Hi Dimiter,

Seems this was a problem with js files being cached from an older version of kendo distribution.

All good now.

Thanks,

Fouad

Tags
Grid
Asked by
ying
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
ying
Top achievements
Rank 1
Fouad
Top achievements
Rank 1
Share this question
or