This solution is quite difficult to implement when the web-application is used by thousands of client all over the world...
I didn't find an appropriate solution for the moment, but one important thing to notice is that this doesn't depend of the application environment...
Simply save the file on your local drive and you will have the same behaviour: the issue doesn't come from http-headers and so on, but from Microsoft Office itself...
In Windows Vista, click Start , type regedit in the Start Search box, and then press ENTER. If you are prompted for an administrator password or for a confirmation, type the password, or click Continue. In Windows XP, click Start, click Run, type regedit, and then click OK. 3. Locate and then click the following registry subkey: HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Security 4. On the Edit menu, point to New, and then click DWORD Value. 5. Type ExtensionHardening, and then press ENTER. 6. Right-click ExtensionHardening, and then click Modify. In the Value data box, enter value 0, and then click OK.
7. On the File menu, click Exit to exit Registry Editor.
chinnivasudeva
Member
10 Points
5 Posts
Re: Problems in Exporting to Excel 2007
Oct 13, 2008 07:29 AM|LINK
Use Excel functionality (include excel.dll features) instead of using
1 = Enable check and prompt 2 = Enable check no prompt deny open] Default setting if value not present is 1 (enable and prompt).
EJLindsay
Member
298 Points
161 Posts
Re: Problems in Exporting to Excel 2007
Oct 13, 2008 08:34 AM|LINK
What do you mean "use excel functionality". Give me an example.
Thanks.
Jay
cisgude
Member
2 Points
1 Post
Re: Problems in Exporting to Excel 2007
Mar 09, 2010 07:26 PM|LINK
Although this thread is quite old, this link still might help someone who just wants a quick fix:
Excel 2007 - Different format than specified by the file extension
AhmadRock51
Member
359 Points
271 Posts
Re: Problems in Exporting to Excel 2007
Apr 16, 2010 11:16 AM|LINK
thanks
NeoCed
Member
11 Points
6 Posts
Re: Problems in Exporting to Excel 2007
Oct 27, 2010 03:41 PM|LINK
This solution is quite difficult to implement when the web-application is used by thousands of client all over the world...
I didn't find an appropriate solution for the moment, but one important thing to notice is that this doesn't depend of the application environment...
Simply save the file on your local drive and you will have the same behaviour: the issue doesn't come from http-headers and so on, but from Microsoft Office itself...
Power_Ranger856
Member
2 Points
5 Posts
Re: Problems in Exporting to Excel 2007
Feb 09, 2011 01:45 PM|LINK
Hi Nachos,
I don't see you saving the excel contents to SQL database. Where are you doing that?
Thank you
Power Ranger
asp.net export to excel 2007
kirit_raja
Member
61 Points
47 Posts
Re: Problems in Exporting to Excel 2007
Sep 08, 2011 05:14 PM|LINK
kirit_raja
Member
61 Points
47 Posts
Re: Problems in Exporting to Excel 2007
Sep 08, 2011 05:16 PM|LINK
Read this. It will help you. http://support.microsoft.com/kb/948615
1 = Enable check and prompt 2 = Enable check no prompt deny open] Default setting if value not present is 1 (enable and prompt).
UncleMike987
Member
26 Points
9 Posts
Re: Problems in Exporting to Excel 2007
Nov 23, 2011 07:41 AM|LINK
Here is a step-by-step guide to exporting data from an ASP.Net application into an Excel 2007 .xslx file, using the OpenXML libraries.
The C# library is completely free, and full source code is provided.
You just have to call one function, passing in a DataTable, DataSet or a List<>, and a filename, where to write the Excel file to.
Enjoy.
http://www.mikesknowledgebase.com/pages/CSharp/ExportToExcel.htm
Phew!
Now, can we all stop working out how to do this, and get back to real work ? !!!