With xlBook.Sheets("Data").Cells(1,1)
.Value = "Overall Product Sales 2000"
.Font.Bold = True
.Font.Name = "Tahoma"
.Font.Size = 16
End With
With xlBook.Sheets("Data").Cells(3,1)
.Value = "Product Name"
.Font.Italic = True
.Font.Name = "Tahoma"
.Font.Size = 13
.MergeCells = True
End With
With xlBook.Sheets("Data").Cells(3,2)
.Value = "Product Income"
.Font.Italic = True
.Font.Name = "Tahoma"
.Font.Size = 13
.MergeCells = True
End With
For i = 0 To Ubound(arrData,2)
xlBook.Sheets("Data").Cells(iRow+i,1).Value = arrData(0,i)
xlBook.Sheets("Data").Cells(iRow+i,2).Value = arrData(1,i)
xlBook.Sheets("Data").Cells(iRow+i,2).NumberFormat = "$#,##0.00"
Next
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(Server.MapPath(strFileName))) Then
Set MyFile = fso.GetFile(Server.MapPath(strFileName))
MyFile.Delete
End If
xlSheet.SaveAs Server.MapPath(strFileName)
xlApp.Application.Quit
Set xlSheet = Nothing
Set xlBook = Nothing
Set xlApp = Nothing