Here's another example:
Dim oXL As Excel.Application
Dim oWB As Excel.Workbook
Dim oSheet As Excel.Worksheet
' Start Excel and get Application object.
oXL = CreateObject("Excel.Application"

oXL.Visible = False
' Get a new workbook.
oWB = oXL.Workbooks.Add
oSheet = oWB.ActiveSheet
' Add column headers
oSheet.Cells(1, 1).Value = "EVENT_DATE"
oSheet.Cells(1, 2).Value = "USER_ID"
oSheet.Cells(1, 3).Value = "USER_NAME"
oSheet.Cells(1, 4).Value = "DOCUMENT_ID"
oSheet.Cells(1, 5).Value = "EVENT_ID"
oSheet.Cells(1, 6).Value = "DOC_TYPE"
oSheet.Cells(1, 7).Value = "JHH_BMC_ACNT"
oSheet.Cells(1, 8).Value = "JHH_BMC_MRN"
oSheet.Cells(1, 9).Value = "LAST_NAME"
oSheet.Cells(1, 10).Value = "FIRST_NAME"
oSheet.Cells(1, 11).Value = "MIDDLE"
oSheet.Cells(1, 12).Value = "AUDIT_DESCRIPTION"
oSheet.Cells(1, 13).Value = "EVENT_DESCRIPTION"
' Format as bold, vertical alignment = center.
With oSheet.Range("A1", "M1"

.Font.Bold = True
.VerticalAlignment = Excel.XlVAlign.xlVAlignCenter
End With
'Load Excel spreadsheet with the Datagrid items
For intRow = 0 To intRowCnt - 1
For intCol = 0 To 12
oSheet.Cells(intRow + 2, intCol + 1).Value = DataGrid1.Item(intRow, intCol)
Next
Next
'Save spreadsheet
oSheet.SaveAs(strName)
'Clean up
oSheet = Nothing
oWB.Close()
oWB = Nothing
oXL.Quit()
oXL = Nothing
'Garbage collection - Required to end the Windows Task Manager process - Excel.exe
GC.Collect()
End Sub
You will also need to load Interop.Office.dll