I'm writing a .net web service to download an excel file created with free version of GemBox.Spreadsheet. Calling the service, the server run but doesn't give any answer. This is the code. Any idea (or another library)? Thanks
'''
<WebMethod(EnableSession:=True)>
Public Sub Download()
SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY")
Dim workbook As New ExcelFile()
Dim worksheet = workbook.Worksheets.Add("Hello World")
worksheet.Cells(0, 0).Value = "English:"
worksheet.Cells(0, 1).Value = "Hello"
worksheet.Cells(1, 0).Value = "Russian:"
worksheet.Cells(2, 0).Value = "Chinese:"
Dim options As SaveOptions = SaveOptions.XlsDefault
Dim filename As String = "TestFile.xls"
Using stream As New MemoryStream
workbook.Save(stream, options)
worksheet.Clear()
worksheet = Nothing
workbook = Nothing
With System.Web.HttpContext.Current.Response
.ClearHeaders()
.ClearContent()
.Buffer = True
.ContentType = "application/vnd.ms-excel"
.AddHeader("content-disposition", "attachment; filename=" + filename)
.AppendHeader("Content-Length", stream.Length)
stream.CopyTo(.OutputStream)
.End()
End With
End Using
End Sub
'''