[問題] asp.net table匯出至excel

看板Web_Design作者 (拿鐵)時間8年前 (2017/02/23 19:22), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/1
小弟目前有個 4 *4的table,其中有一個cell 放一個純文字 + imagebutton,其他的cel l皆是純文字,另外在table外有一個button用來匯出此table的內容到excel(imagebutton 並不想匯出) 目前卡在有此imagebutton無法匯出table的內容 下面是小弟將table內容匯出的程式 Response.ContentType = "application/x-msexcel"; Response.AddHeader("Content-Disposition", "attachment;filename=ExcelFile.xls "); Response.ContentEncoding = System.Text.Encoding.Default; StringWriter tw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(tw); reporttitle.RenderControl(hw); Response.Write(tw.ToString()); 請問各位前輩此問題該如何解決?謝謝大家~ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 223.137.149.202 ※ 文章網址: https://www.ptt.cc/bbs/Web_Design/M.1487848941.A.756.html

03/15 06:26, , 1F
Spire.Export 社群版
03/15 06:26, 1F
文章代碼(AID): #1OhiNjTM (Web_Design)
文章代碼(AID): #1OhiNjTM (Web_Design)