Just in case here is the whole sub routine:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim fileName As String = "test.xls"
Dim workbook As Workbook = New Workbook
workbook.Worksheets.Add()
Dim worksheet As Worksheet = workbook.Worksheets(0)
'Setting the foreground color of the "A1" cell to yellow
worksheet.Cells("A1").PutValue("Test")
worksheet.Cells("A1").Style.Font.IsBold = True
worksheet.Cells("B1").PutValue("Test2")
worksheet.Cells("B1").Style.Font.IsItalic = True
worksheet.Cells("B1").Style.Font.Color = Color.Red
worksheet.Cells("B1").Style.Pattern = BackgroundType.Solid
worksheet.Cells("B1").Style.ForegroundColor = Color.Yellow
worksheet.Cells("A1").Style.ForegroundColor = Color.Yellow
'Setting the background pattern of the "A1" cell to vertical stripe
worksheet.Cells("A1").Style.Pattern = BackgroundType.None
'Setting the foreground color of the "A2" cell to blue
'worksheet.Cells("A2").Style.ForegroundColor = Color.Blue
'Setting the background color of the "A2" cell to yellow
worksheet.Cells("A2").Style.BackgroundColor = Color.Yellow
'Setting the background pattern of the "A2" cell to vertical stripe
worksheet.Cells("A2").Style.Pattern = BackgroundType.DiagonalCrosshatch
'Saving the Excel file
'workbook.Save(fileName, FileFormatType.Excel2003)
'Process.Start(fileName)
Dim fs As New System.IO.MemoryStream
fs = workbook.SaveToStream()
System.Web.HttpContext.Current.Response.Clear()
'Specify the document type
System.Web.HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"
'Other options:
'System.Web.HttpContext.Current.Response.ContentType = "text/plain"
'System.Web.HttpContext.Current.Response.ContentType = "text/html"
'Specify how the document is sent to the browser.
System.Web.HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=MyBook.xls")
'Another option could be:'Response.AddHeader "content-disposition","inline; filename=MyBook.xls";
'Get data bytes from the stream and send it to the response.
Dim bytes As Byte()
bytes = fs.ToArray()
System.Web.HttpContext.Current.Response.BinaryWrite(bytes)
System.Web.HttpContext.Current.Response.End()
End Sub