브라우저에서 Excel 파일로 렌더링해야하는 일부 콘텐츠가 있습니다. 아래 코드를 사용하여 그리드 컨텐츠를 렌더링 할 수있었습니다.브라우저에서 Excel 렌더링
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=FileName.xls");
Response.Charset = "";
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite =
new HtmlTextWriter(stringWrite);
GridView1.RenderControl(htmlWrite);
htmlWrite.Write(stringWrite);
Response.Write(stringWrite.ToString());
Response.End();
이제 이미지와 비슷한 것을해야합니다. 즉, 이미지를 렌더링 할 수있는 코드가 필요합니다.
나는 사용자가 엑셀을 열면 이미지를 볼 수 있어야한다는 것을 의미합니다.
이미지를 base64sting 형식으로 변환하여 Excel에 넣을 수 있습니까?
이와 비슷한 의견이 있으면 알려 주시기 바랍니다.
감사 비 노드 T. 내가 엑셀로 그리드 데이터 (태그 HTML)를 얻기 위해 해킹의 같은 종류를 사용하고
덕분에 대단히 ...이 노력하고 있습니다 ... 내 옆에 작업이 여러 페이지를 렌더링 파일을 능가하는 것입니다 ... 당신은 알려 주시기 바랍니다 수 있습니다 전에도 이런 식으로 시도한 적이 있습니까? – Vinodtiru