This time I'm facing some presentation problems at the moment to export a nested GridView to Excel. Here is the screenshot of the GridView in my ASP.Net page.
Thanks for your help. I've check the links you posted. Some of them I've already saw. The fisrt one have a extra code that I tried to implement however I coulnd't to export the Nested GridView in the correct way.
I guess I will need to implement a method to proccess the html generated for the RenderControl() method of the GridView I aadapt it in the proper way whit the corresponding styles and data
Thanks for the links. I had already the first one. I tried and achieved to implement the same. I might be it will sound a little crazy but I got the same result of commented in a previos post. The detail of exporting a Nested Gridview with some CSS styles
where in the fact that at the moment to render the Grids to an HTML table it was not render in thre proper way. Some extra <td> tags appeared.
At the end of the day, I chose to do a kind of method to interate for the records in the main a nested gridview rows and have a more custom table to export to excel in the proper way. I mean, how the original request was done.
Anyway thanks each of you to help me in this
Regards!
Marked as answer by Lesthad_mk on May 24, 2012 10:32 PM
Lesthad_mk
Member
96 Points
159 Posts
Export Nested Gridview to Excel
May 22, 2012 04:17 AM|LINK
Hi all
This time I'm facing some presentation problems at the moment to export a nested GridView to Excel. Here is the screenshot of the GridView in my ASP.Net page.
http://imageshack.us/f/204/gridviewnormal.png/
But at the moment to export a excel the presentation of the GridView change
http://imageshack.us/photo/my-images/443/gridviewexcel.png/
If you saw the images above you had noticed that the way how the GridView was exported to excel changed.
Does any one has any clue or a good tutorial how to do this?
Regards!
kirupa.v
Contributor
2070 Points
531 Posts
Re: Export Nested Gridview to Excel
May 22, 2012 04:29 AM|LINK
Hi,
Try for these links
http://www.csharpaspnetarticles.com/2011/10/export-gridview-to-excel.html
http://www.eggheadcafe.com/community/visual-studio/7/10061137/how-to-export-nested-gridview-to-msword--msexcel.aspx
http://stackoverflow.com/questions/7525537/how-to-exporting-to-excel-parent-and-nested-gridview-data
Reply me for any issues..
Lesthad_mk
Member
96 Points
159 Posts
Re: Export Nested Gridview to Excel
May 22, 2012 06:35 PM|LINK
Hi Kirupa
Thanks for your help. I've check the links you posted. Some of them I've already saw. The fisrt one have a extra code that I tried to implement however I coulnd't to export the Nested GridView in the correct way.
I guess I will need to implement a method to proccess the html generated for the RenderControl() method of the GridView I aadapt it in the proper way whit the corresponding styles and data
Regards!
Qin Dian Tan...
All-Star
113532 Points
12480 Posts
Microsoft
Re: Export Nested Gridview to Excel
May 24, 2012 07:21 AM|LINK
Hi,
Have a look at these two links with code:
http://www.eggheadcafe.com/community/visual-studio/7/10031792/eporting-nested-gridview.aspx
http://lakshmik.blogspot.com/2006/04/aspnet-export-to-excelword-from-nested.html
Thanks,
If you have any feedback about my replies, please contactmsdnmg@microsoft.com.
Microsoft One Code Framework
Lesthad_mk
Member
96 Points
159 Posts
Re: Export Nested Gridview to Excel
May 24, 2012 10:32 PM|LINK
Hi Qin
Thanks for the links. I had already the first one. I tried and achieved to implement the same. I might be it will sound a little crazy but I got the same result of commented in a previos post. The detail of exporting a Nested Gridview with some CSS styles where in the fact that at the moment to render the Grids to an HTML table it was not render in thre proper way. Some extra <td> tags appeared.
At the end of the day, I chose to do a kind of method to interate for the records in the main a nested gridview rows and have a more custom table to export to excel in the proper way. I mean, how the original request was done.
Anyway thanks each of you to help me in this
Regards!