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
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.
Didie
Telerik
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 >>
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
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.
Didie
Telerik
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 >>
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?
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.