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
a. Start COM+ Explorer. On the Start menu, click Admin Tools, and then click Component Services.
b. Click to expand Component Services, click to expand Computers, click to expand My Computer, and then click to expand DCOM Config.
c. Right-click VB ASP Debugging, and the click Properties.
d. On the Securities tab, under Access Permissions, select Customize, and then click Edit.
e. In the Access Permission window, click Add, and then add the Everyone account for Allow Access option.
f. Click OK, click Apply, and then click OK to apply the changes and exit the DCOM Configuration properties page.
g. Restart the computer so that the changes take effect.