Hi,
I am new to this and have a requirement to export 2 gridviews and chart into same excel sheet using c#. Any help is much appreciated.
Regards
Tushar Goel
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Suthish NairRank #92 · 22.8K reputationPosted Feb 4, 2011, 11:47 PM EST
Refer below article to export to excel.
Export Image to Microsoft Office Excel using C#
Mahesh ChandRank #1 · 393.4K reputationPosted Feb 5, 2011, 3:29 AM EST
Tushar Goel26 reputationPosted Feb 5, 2011, 5:51 AM EST
Suthish NairRank #92 · 22.8K reputationPosted Feb 5, 2011, 6:03 AM EST
Sam HobbsRank #108 · 20.5K reputationPosted Feb 5, 2011, 10:50 AM EST
To export data from a gridview, if this is for an ASP .Net application then it should be in an ASP .Net forum.
Theoretically speaking, a GridView or a DataGridView typically has data from a data source such as a database. If it does, then it is usually easier to export from the data source, not the control.
You can write to the Excel worksheet in one of two ways; either using ADO .Net or by using the Excel object model. Probably ADO .Net would be easier but what to use depends on various things, such as your personal preference.
Tushar Goel26 reputationPosted Feb 5, 2011, 8:41 PM EST
Suthish NairRank #92 · 22.8K reputationPosted Feb 6, 2011, 12:47 AM EST
Tushar Goel26 reputationPosted Feb 7, 2011, 3:36 AM EST
Suthish NairRank #92 · 22.8K reputationPosted Feb 7, 2011, 9:11 AM EST