Private Sub btEXCEL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btEXCEL.Click
Dim obj_Excel As Object
Dim obj_hoja As Object
Dim obj_libro As Object
Dim LETEXCEL() As String = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N"}
obj_Excel = CreateObject("Excel.Application")
obj_libro = obj_Excel.Workbooks.Add()
obj_hoja = obj_libro.Worksheets(1)
Dim i As Integer
For i = 0 To dtg.Columns.Count - 1
obj_hoja.Range(LETEXCEL(i) & "1").Value = dtg.Columns(i).HeaderText
Next
'Ponemos en negrita los encabezados
obj_hoja.Range("A1:N1").Font.Bold = True
Dim j As Integer
'Recorremos el datagridview (dtg) i exportamos celda a celda
For i = 0 To dtg.Columns.Count - 1
For j = 0 To dtg.RowCount - 1
obj_hoja.range(LETEXCEL(i) & j + 2).value = dtg(i, j).Value
Next
Next
obj_Excel.Visible = True
End Sub