While exporting HTML in excel format you may encounter this error when opening the exported Excel file:
The file you are trying to open, ‘XXX.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.
This bug cannot be fixed through asp.net code. Here is more information on this problem:
If this app is running on an intranet and some specific computers is heavily using this export to excel feature, then we can suppress this warning notification by modifying the registry on each of the client computers as follows: [HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Security]“ExtensionHardening”=dword:00000000 1. Open your Registry (Start -> Run -> regedit.exe) 2. Navigate to HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\OFFICE\12.0\EXCEL\SECURITY 3. Right click in the right window and choose New -> DWORD 4. Type “ExtensionHardening” as the name (without the quotes) 5. Verify that the data has the value “0″
What kind of email newsletter would you prefer to receive from CodeAsp.Net?