OpenInBrowser not working


I’m trying to write and run the “Hello World” code. I am able to save it to a file on the hard drive, but cannot write it directly to the response buffer. Here is my code, can you tell me what i’m doing wrong?

oExcel = New Excel
oWorkSheets = oExcel.Worksheets
iCurrentWorkSheet = iCurrentWorkSheet + 1

oWorkSheet = oWorkSheets(iCurrentWorkSheet)
oWorkSheet.Name = "Test"

iCurrentRow = iCurrentRow + 1
iCurrentCol = iCurrentCol + 1

Dim oCells As Cells = oWorkSheet.Cells
Dim oCell As Cell = oCells(iCurrentRow, iCurrentCol)
oCell.PutValue(“Hello World!”)

oExcel.Save(“HelloWorld.xls”, SaveType.OpenInBrowser, FileFormatType.Default, Me.Response)



Sometimes the OpenInBrowser option doesn’t work correctly. But that’s not a problem of Aspose.Excel, but a problem of MS Excel working with IE.

Please check this:

1. Do you have an MS Excel program running in the background? If yes, please close it.

2. Please access our website to see if our demo works correctly.

3. Move to another machine to see if you program works fine.

4. Or re-install your MS Excel.