Write data to Excel file
- From: "Pauravi" <Pauravi@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Jun 2005 13:19:03 -0700
Hi
I want to export web controls value into the Excel file.
Detail :
I have a text box where user can type the filename and on click of button a
dialog box should appear that will ask user to where to save the file and
that file should contain all the data from the webcontrols for example
<asp:label>
I tried the following code.
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName
+ ".xls")
Response.Write("<table><tr><td>" & Me.TotalRevenueLabel1.Text &
"</td></tr></table>")
But this code doesnt write value of the "TotalRevenueLabel1.text" inside the
Excel file but it renders whole webpage.
Please provide the solution for this as soon as possible.
Thanks
Regards,
Pauravi
.
- Prev by Date: Run a VB.NET class file from Windows Scheduler
- Next by Date: Re: app.config
- Previous by thread: Run a VB.NET class file from Windows Scheduler
- Next by thread: Highlighting tabs in a TabControl
- Index(es):