The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: DataGridView to Word And Excel
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

khurram khanPosted Nov 3, 2015, 4:53 AM
thank you bro
warren weePosted Jan 8, 2012, 10:17 PM
Hi, I am trying your code now. But I found out that after exporting to excel, I am facing a error. It stated that, the excel file is not in a correct format. Do you have any idea what is going on ???
Sam HobbsPosted Aug 4, 2011, 9:39 PM
That sure looks easy. In my opinion, it is better to export the data from the data source, not the control (DataGridView). In other words, the data can be written from wherever the data comes from that goes into the DataGridView. I admit that it is not so easy to explain how to do it that way, but it is more flexible.