Dim App As New Excel.Application
App.Visible = True
App.Application.SheetsInNewWorkbook = 1
Dim Destination As Excel.Workbook = App.Workbooks.Add()
Dim Destination_Sheet As Excel.Worksheet = Destination.Sheets(1)
'Updates the cells with labels
Destination_Sheet.Range("A1").Value = Now
Destination_Sheet.Range("A2").Value = "CATEGORY"
Destination_Sheet.Range("B2").Value = "DESCRIPTION"
'Set row to insert data
SSRow = 3
'looping occurs here
tempCell = "A" & Trim(Str(SSRow))
Destination_Sheet.Range(tempCell).NumberFormat = "@"
Destination_Sheet.Range(tempCell).Value = Category
tempCell = "B" & Trim(Str(SSRow))
Destination_Sheet.Range(tempCell).Value = Description
tempCell = "C" & Trim(Str(SSRow))
SSRow = SSRow + 1
'looping ends here
'Autofit Columns
Destination_Sheet.Columns.AutoFit()
'Shade Column headers
Destination_Sheet.Range("A2", "C2").Interior.ColorIndex = 15
'Save woorkbook
Destination_Sheet.SaveAs(DestinationPath.Text & "FileName.XLS")
App.Workbooks.Close()
App.Quit()
Maybe this will help,
Loyd