제목 : gridview 내용을 엑셀에 보내는데요,애러가 떠요
글번호:
|
|
582
|
작성자:
|
|
하나
|
작성일:
|
|
2007/05/08 오후 7:47:00
|
조회수:
|
|
3587
|
Dim ds_emp As DataTable = bc.GetBCTHZAuthGrp(ddl_id.Text, ddl_yn.Text)
Response.Clear()
Response.AddHeader("content-disposition", "attachment;filename=FileName.xls")
Response.Charset = "gb2312"
Response.ContentType = "application/vnd.xls"
Dim stringWrite As IO.StringWriter = New System.IO.StringWriter()
Dim htmlWrite As Web.UI.HtmlTextWriter = New HtmlTextWriter(stringWrite)
GV_authGrp.AllowPaging = False
GV_authGrp.DataSource = ds_emp
GV_authGrp.DataBind()
----> 여기서 애러나요 GV_authGrp.RenderControl(htmlWrite)
Response.Write(stringWrite.ToString())
Response.End()
감사합니다