| | |
Exprot to Excel in ASP.NET using C#
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2007
Posts: 1
Reputation:
Solved Threads: 0
Hi All,
I have an application where user can export the results of search action to an excel file so he can locally store it.. I have done this with very simple code which is
All work fine when end user has Excel 2003 but when he has Excel 2007 it gives a warning err message when he tries to open the rendered Excel File,
I guess i need framework 3.0 to Support the file format of Excel 2007. What in the code needs to be changed to have compatibility with Excel 2007 File.....:rolleyes:
I have an application where user can export the results of search action to an excel file so he can locally store it.. I have done this with very simple code which is
C# Syntax (Toggle Plain Text)
Response.ContentType = "application/vnd.ms-excel"; Response.AppendHeader("content-disposition", "attachment; filename=StackRanking.xls"); Response.Charset = ""; System.IO.StringWriter sw = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(sw); ........fils dataset..... hw.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Html); dg.RenderControl(hw); hw.RenderEndTag(); Response.Write(sw); Response.End();
All work fine when end user has Excel 2003 but when he has Excel 2007 it gives a warning err message when he tries to open the rendered Excel File,
I guess i need framework 3.0 to Support the file format of Excel 2007. What in the code needs to be changed to have compatibility with Excel 2007 File.....:rolleyes:
![]() |
Similar Threads
- Freelance Developer ASP.NET / VB.NET / C# / VB / ASP & Crystal Reports (Web Development Job Offers)
- Need help on export asp.net table to excel (ASP.NET)
- Export to Excel from ASP.NET app (ASP.NET)
- Batch file in ASP.Net to convert Excel files into higher version (ASP.NET)
- "No Servers are available" Error with ASP.NET Webpage (Networking Hardware Configuration)
- ASP.NET Freelance Programmer / Developer (IT Professionals' Lounge)
- ASP.NET to Power Point (ASP.NET)
- .NET Speech SDK for ASP.NET (ASP.NET)
Other Threads in the C# Forum
- Previous Thread: String -> Binary -> TextBox -> AARGH!
- Next Thread: How to search for a string in a file
| Thread Tools | Search this Thread |
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# check checkbox client color combobox control conversion csharp custom data database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file form format forms function gdi+ getoutlookcontactusinfcsvfile globalization httpwebrequest image index input install java label list listbox listener mandelbrot math mono mouseclick mysql operator panel path photoshop picturebox pixelinversion post programming radians regex remote remoting richtextbox serialization server silverlight sleep socket sql sql-server statistics stream string table tcp text textbox thread time timer timespan update upload usercontrol users validate validation visualstudio webbrowser windows winforms wpf xml





