Excel Export Warning

QuestionsExcel Export Warning
Susan Watt asked 11 years ago

Is there any way to prevent the excel exports from getting the warning "The file you are trying to open 'report_grid.xls' is in a different format than specified by the file extension"

2 Answers
Abu Ghufran answered 11 years ago

It's a common issue with new version of ms excel, but i am unable to generate this issue.
http://forums.asp.net/t/1221467.aspx?Export+GridView+to+Excel+xlsx+Excel+2007+Format+

After some research, i found this lib which (by comments) is capable to remove this warning.
http://phpexcel.codeplex.com/wikipage?title=Examples&referringTitle=Home

Can you please check it's demos, if it is working fine or not. After that, i can incorporate it in grid code lib.

Mike Sheppard answered 9 years ago

This can be solved with a registry edit (or a group policy).

Change the version to your Excel Version appropriately (Office 2003 = 11.0, Office 2007 = 12.0, Office 2010 = 14.0 and Office 2013 = 15.0).

[HKEY_CURRENT_USERSoftwareMicrosoftOffice<version#>ExcelSecurity]
"ExtensionHardening"=dword:00000000

Your Answer

18 + 11 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?