2009年3月26日

ASP.net儲存成EXcel檔(VB執行碼)

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)

Response.AddHeader("content-disposition", "attachment;filename=test.xls")

Response.ContentType = "application/vnd.ms-excel" 'execl格式輸出

Response.Charset = "" '以Content-Type Header中去除Charset設置


End Sub

沒有留言: