-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: Thepelicanbrief2
Message 2 in Discussion

use the mime content type which can be changed to -
Response.ContentType = "application/vnd.ms-excel";

sample code - 

                        Response.ClearContent();
                        
                        Response.ClearHeaders();
                        Response.Clear();
                        
                        Response.ContentType = "application/vnd.ms-excel";
                        
                        Response.AppendHeader("Connection","keep-alive");

                        Response.AppendHeader("Content-Disposition",
"attachment;filename=" + fileName );
                        Response.Write(htmlText);
                        
                        Response.Flush();  
                        Response.End();
                        
                      Response.Close();

htmltext variable is nothing but html data which can be taken from the
datagrid.

if you have any doubts please respond back. i have created a generic
component which you can resue as well.

regards,
sujay

-----Original Message-----
From: MumbaiUserGroup [mailto:[EMAIL PROTECTED]
Sent: Mittwoch, 4. August 2004 15:43
To: [EMAIL PROTECTED]
Subject: Export to Excel.


-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: hprahul
Message 1 in Discussion


Hello Group,
 
I am using C#. Net 2003. and want to export some 
data to excel (97/2000/xp/2003)?
 
Is there any way to export the data to excel 
without excel being installed on development system and target 
system?
 
Thanks,
Rahul

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your
E-mail Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On
the pre-addressed e-mail message that opens, simply click "Send". Your
e-mail address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]


-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to