By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,401 Members | 793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,401 IT Pros & Developers. It's quick & easy.

Exporting datagrid contents to Excel using ASP.NET

P: n/a
Hello,

I am attempting to export the contents of a datagrid on my webform (using
Excel automation) through ASP.NET.

I have added the Excel object library to my VS ASP.NET project but I am lost
on how to export my datagrid contents to Excel?

I am sure it can be done but having difficulties figuring out the code.

Any help would be greatly appreciated.

Thanks,

Mike
Mar 14 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hello Mike,

See sample there

http://gridviewguy.com/ArticleDetails.aspx?articleID=26

M> I am attempting to export the contents of a datagrid on my webform
M> (using Excel automation) through ASP.NET.
M>
M> I have added the Excel object library to my VS ASP.NET project but I
M> am lost on how to export my datagrid contents to Excel?
M>
M> I am sure it can be done but having difficulties figuring out the
M> code.
M>
M> Any help would be greatly appreciated.

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Mar 14 '06 #2

P: n/a
Hi Michael,

Thanks for the tip. One more hurdle to cross though!

I am using VS 2003 and have added the System.IO import into my project
imports but Intellisense is still purple squiggly lining:

System.IO.StringWriter and System.Web.UI.HtmlTextWriter

I cannot locate the System.IO reference when I try to add to add it. Is
there something I am missing?

Please let me know.

Thanks,

Mike

"Michael Nemtsev" wrote:
Hello Mike,

See sample there

http://gridviewguy.com/ArticleDetails.aspx?articleID=26

M> I am attempting to export the contents of a datagrid on my webform
M> (using Excel automation) through ASP.NET.
M>
M> I have added the Excel object library to my VS ASP.NET project but I
M> am lost on how to export my datagrid contents to Excel?
M>
M> I am sure it can be done but having difficulties figuring out the
M> code.
M>
M> Any help would be greatly appreciated.

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Mar 14 '06 #3

P: n/a
Hello Mike,

Check that u add using System.IO and using System.Web.UI to you project
if this doesn't help try to reload project and studio, smth wrong with it
These classes are in vs2003, see msdn for example

M> Hi Michael,
M>
M> Thanks for the tip. One more hurdle to cross though!
M>
M> I am using VS 2003 and have added the System.IO import into my
M> project imports but Intellisense is still purple squiggly lining:
M>
M> System.IO.StringWriter and System.Web.UI.HtmlTextWriter
M>
M> I cannot locate the System.IO reference when I try to add to add it.
M> Is there something I am missing?
M>
M> Please let me know.
M>
M> Thanks,
M>
M> Mike
M>
M> "Michael Nemtsev" wrote:
M>
Hello Mike,

See sample there

http://gridviewguy.com/ArticleDetails.aspx?articleID=26

M> I am attempting to export the contents of a datagrid on my
webform
M> (using Excel automation) through ASP.NET.
M>
M> I have added the Excel object library to my VS ASP.NET project but
I
M> am lost on how to export my datagrid contents to Excel?
M>
M> I am sure it can be done but having difficulties figuring out the
M> code.
M>
M> Any help would be greatly appreciated.
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Mar 14 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.