Jump to content

Vb.net Projects With Ms Access Database Free !!better!! Download Now

Private Sub btnExport_Click(sender As Object, e As EventArgs) Handles btnExport.Click Dim xlApp As New Excel.Application Dim xlWB As Excel.Workbook = xlApp.Workbooks.Add Dim xlWS As Excel.Worksheet = xlWB.Sheets(1) For i As Integer = 0 To DataGridView1.Columns.Count - 1 xlWS.Cells(1, i + 1) = DataGridView1.Columns(i).HeaderText Next ' ... loop through rows and cells xlApp.Visible = True End Sub

×
×
  • Create New...