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

Support for Excel 2010 for Telerik RadGrid

5 Answers 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Aditi
Top achievements
Rank 1
Aditi asked on 08 Feb 2013, 11:43 PM
Hi Telerik.

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?

Thanks,
Aditi

5 Answers, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 13 Feb 2013, 04:11 PM
Hello Aditi,

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"

Nevertheless you could use newest export formats which is based on the binary Excel format BIFF. Opening a file exported in this format won't trigger a warning message as with the other two supported formats. More information could be found at the following help topic.

I hope this information helps.

Greetings,
Kostadin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Aditi
Top achievements
Rank 1
answered on 14 Feb 2013, 11:33 PM
Hi Kostadin/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:
  1. Export data from grid to excel
  2. FileDownload box prompts (Check the attached screenshot "Excel_FileDownload_Box"). Which asks to open or save file.
  3. Click on Open button.
  4. 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.

Please suggest.

Thanks,
Aditi

0
Kostadin
Telerik team
answered on 19 Feb 2013, 03:51 PM
Hi Aditi,

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.

Regards,
Kostadin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
RBeco
Top achievements
Rank 1
answered on 04 Sep 2013, 02:48 PM
I have the same issue. I have a somewhat more complexer grid with mainly GridTemplateColumns. I set the Exel Format to Biff, but I still get the error message mentioned here when I export to excel.

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

Thanks
0
Kostadin
Telerik team
answered on 09 Sep 2013, 08:36 AM
Hello,

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.

Regards,
Kostadin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Aditi
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Aditi
Top achievements
Rank 1
RBeco
Top achievements
Rank 1
Share this question
or