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

Export warning for xls format

6 Answers 251 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Richard Harrigan
Top achievements
Rank 1
Richard Harrigan asked on 29 Jul 2013, 01:12 AM
Hi

I get the following error warning when exporting and 'xls' extension:

'The file you are trying to open is in a different format than specified by the file extension.  Verify that the file is not corrupted and id from a trusted source before opening the file.  Do you want to open the file now?'

This happen in the online demo and in my program.  How do I prevent this message from occurring?

I am using Excel 2010 and the latest Telerik libraries

Thanks
Rich

6 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 29 Jul 2013, 07:02 AM
Hello Rich,

The alert is a new security feature in Excel 2010 called Extension Hardening, which ensures that the file content being opened matches the extension type specified in the shell command that is attempting to open the file. 
You can check this help article for an additional information.
 

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Richard Harrigan
Top achievements
Rank 1
answered on 29 Jul 2013, 06:06 PM
Hi Didie,

The help article said there is no solution.   Is that still the situation?  Is it only Excel 2010?   Is there any work-around?

Thanks
Rich
0
Dimitrina
Telerik team
answered on 30 Jul 2013, 07:34 AM
Hi Rich,

RadGridView can export with ExportFormat.HTML and ExportFormat.ExcelML - in both cases not native for Excel 2010. In case of HTML export you will get such warning and this cannot be avoided, however if you export to ExcelML with XML extension you will not get it. 

I can suggest this as a workaround.

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Josh K
Top achievements
Rank 1
answered on 12 Jan 2015, 08:45 PM
The help article says it's due to Extension Hardening, which is "new security feature in Excel 2007." Excel 2007 is hardly new - that version of Excel was released 8 years ago this month - but the problem still exists in RadGridView in 2015. In that eight years, has Telerik really not implemented a proper solution to this?

The core problem here is that RadGridView exports to the Excel format that was current in 2003, but that was replaced in 2007 by Office Open XML.

Are there plans to support the newer Office Open XML format that was released just over 8 years ago and that has been the standard for Office 2007, 2010, 2013 and 365?
0
Dimitrina
Telerik team
answered on 14 Jan 2015, 11:51 AM
Hello,

Thank you for sharing your feedback.  We are currently working on improving the export experience to allow direct exporting to xlsx and pdf formats. It is going to be introduced with the upcoming Q1 2014.

You can also follow the RadGridView: Export Content as *.xlsx feature request in the feedback portal.

For the time being, I can suggest you to use the approach illustrated in our "SpreadProcessing Integration" WPF Demo and export to .xlsx format.

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Josh K
Top achievements
Rank 1
answered on 14 Jan 2015, 12:57 PM
That's excellent news! Thanks for the quick response.
Tags
GridView
Asked by
Richard Harrigan
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Richard Harrigan
Top achievements
Rank 1
Josh K
Top achievements
Rank 1
Share this question
or