Quantcast
Channel: ASPSnippets RSS Feed
Viewing all articles
Browse latest Browse all 4693

Export DataGridView to Excel with Formatting using C# and VB.Net

$
0
0
Here Mudassar Ahmed Khan has explained with an example, how to export DataGridView data to Excel file with formatting i.e. Colors and Styles in Windows Forms (WinForms) Applications using C# and VB.Net. DataGridView cannot be exported directly to Excel file and hence need to generate a DataTable and export the DataTable to Excel file. The DataTable will be exported to a formatted Excel file using ClosedXml library which is a wrapper of OpenXml.

Viewing all articles
Browse latest Browse all 4693

Trending Articles