cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying data in excel

Former Member
0 Kudos

Hi All,

Im creating an application tht reads data from an rfc and displays tht data in excel.While doing this im getting an portal login screen in excel sheet instead of data..herewith im giving my code..,can anyone provide me the needed solution for this problem..

Code:

Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

GetConnectionParameters()

Dim userlist As String

Dim b(10) As Byte

Response.Buffer = False

Response.Charset = ""

EnableViewState = False

Response.ContentType = "application/vnd.ms-excel"

Response.AddHeader("Content-Disposition", "attachment;filename = new1.xls")

SapProxySharpObj.Zrk_Pass_Excel(b)

Response.BinaryWrite(b)

Response.Flush()

Response.Close()

End Sub

the same code gives correct output in asp.net application but not in portal..wt might be the reason for this..??

Regards,

Vinoth

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I m facing the same issue. Have you found a solution for it? Response.ContentType is not recognized in portal. Wat could be the alternative?

Regards,

Madhesh