I was looking in forums for excel 2010 support in Telerik Rad Grid.
As currently when we export to excel it prompts following message:
The file you are trying to open, '[filename].xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
Which users find annoying. When I was going through forums I had read that you are going to add support for excel 2010 in Q3-Q4 2012.
However didn't find any concrete answers yet on this release.
Could you please let us know whether the support for excel 2010 has been released for Telerik Rad Grid which will also suppress above message?
5 Answers, 1 is accepted
Thank you for contacting us.
The cause of this warning message is explained in details in the following blog posts:
MSDN blogs: Excel 2007 Extension Warning On Opening Excel Workbook from a Web Site
Grinn blog: "The file you are trying to open, '[filename]', is in a different format"
I hope this information helps.
the Telerik team
I tried the solution from help topic mentioned in below your post.
The Biff format works fine when I save excel and then open it. However if I directly open exported excel, it results in excel error message.
Steps to reproduce:
- Export data from grid to excel
- FileDownload box prompts (Check the attached screenshot "Excel_FileDownload_Box"). Which asks to open or save file.
- Click on Open button.
- Excel Error message box appears "The file is corrupt and cannot be opened" (Check the attached screenshot "Excel_Error").
I have attached the two screenshot for error message and the FileDownload.
I was not able to reproduce the issue on my side. I prepared a small sample and attached it to this forum post. Could you please give it a try and let me know how it differs from your real setup? Additionally it would be best if you could replicate the issue in my sample or provide us with a small runnable project where the issue could be observed.
the Telerik team
In the same page I added the example as given here by Kostadin and that works perfectly and exports without error.
The only difference I can spot in the export is that my grid exports with an extra (empty) row where the filterrow was in the grid, while Kostadins grid doesnt export this extra row (I added filters to his/her grid to see if that was the culprit, but it still exported without error)
Hope someone can shed some light
It is hard to pinpoint the reason for that behaviour without your code declaration. Could you please provide it in order to investigate the issue further? Additionally you could try disabling the filter before exporting to excel. This could be achieved by setting AllowFitler to false and then rebind the grid if IgnorePaging is not set.