Hi This is the code to Export data to excel file from table in vb.net Public Sub XportToXcel(ByVal dt As DataTable) Try Dim XApp As New Excel.Application Dim XBook As Excel.Workbook = XApp.Workbooks.Add Dim XSheet As Excel.Worksheet = CType(XBook.Worksheets(1), Excel.Worksheet) XApp.Visible = False With XSheet Dim c As Long = Asc("A") For Each dc As DataColumn In dt.Columns .Cells(1, c).Value = dc.ColumnName.ToString .Cells(1, c).Font.Bold = True c += 1 Next Dim i As Long = 2 For Each dr As DataRow In dt.Rows c = Asc("A") For Each dc As DataColumn In dt.Columns .Cells(i, i - 1).Value = dr.Item(dc.ColumnName) c += 1 Next i += 1 Next XApp.Visible = True End With Catch ex As Exception MessageBox.Show("Source [" & ex.Source & "] Description [" & ex.Message & "]") End Try End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click XportToXcel(DataGrid1.DataSource) I hope this will idea for u r problem Have a Nice day