I have a submit button on a page which runs some code to generate a merge and designer spreadsheet and then send it to the user. The code runs fine until it attempts to open. Then I receive an error about the http headers already being written. There isn't much to the code. If I run the code from the load event of the page it works fine. I'm also having the same problem if I open a spread directly from the server and try to save it to the user.
As a side note, on the same page I generate a designer word document and have no problem sending that to the user.
Function SendSpreadToUserFromStream(ByVal WorkBookName As Workbook, ByVal strFileName As String) As String
' Sends workbook which is contained in memory to user
WorkBookName.Save(strFileName, FileFormatType.Default, Aspose.Cells.SaveType.OpenInExcel, Response)
Thanks for any help