Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
Hi All,

I have multiple Gridviews in my project. I have to export my all gridviews into excel workbook but the condition is that each gridview should be exported to single sheet of the same workbook.
Just like below:

GridView1 = Sheet1
GridView2 = Sheet2
GridView(n) = Sheet(n)

and so on.

Only one gridview is visible and the others are dynamically created on different scenarios.

I have googled everything and found the conclusion of exporting DataSet which contains all my datatables.. But, the text formatting I need in excel should be same as GridView formatting and if I export datatables, the data has no formatting in the excel. (Transposing Rows into Columns of some gridviews which should be exported as same as format is) that is why exporting DataTables or DataSet to Excel was unsuccessful for my project.

Please help me in this matter.

Thanks,
AR.
Posted
Comments
Maciej Los 7-May-14 7:12am    
Waht have you tried? Where are you stuck?
AR547 7-May-14 7:19am    
I need to export all my gridviews to single excel workbook with separate worksheets.
Herman<T>.Instance 7-May-14 9:05am    
Use EPPLUS for that

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900