0
일부 데이터가있는 표가 있습니다. 한 열에 대해 사용자에게 더 잘 보이도록 이미지가 추가되었습니다. 이제는 엑셀 시트를 내보내기위한 내보내기 옵션이 있습니다. in excel 내가 이미지를 찾을 수 없습니다 아이콘을 받고있다. 내가 엑셀 시트에서 사용자에게 이미지를 보여주고 싶지 않아. 모든 도움내보낼 때 그리드에서 이미지를 제거하는 방법
Response.ClearContent();
Response.Buffer = true;
Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", "123.xls"));
Response.ContentType = "application/ms-excel";
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
// gdAclog.AllowPaging = false;
// gdAclog.DataBind();
//Change the Header Row back to white color
gdAclog.HeaderRow.Style.Add("background-color", "#FFFFFF");
//Applying stlye to gridview header cells
for (int i = 0; i < gdAclog.HeaderRow.Cells.Count; i++)
{
gdAclog.HeaderRow.Cells[i].Style.Add("background-color", "#507CD1");
}
int j = 1;
//This loop is used to apply stlye to cells based on particular row
foreach (GridViewRow gvrow in gdAclog.Rows)
{
gvrow.BackColor = Color.White;
if (j <= gdAclog.Rows.Count)
{
if (j % 2 != 0)
{
for (int k = 0; k < gvrow.Cells.Count; k++)
{
gvrow.Cells[k].Style.Add("background-color", "#EFF3FB");
}
}
}
j++;
}
gdAclog.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
내 이미지는 어느 셀입니까? –
5 개 항목 템플릿의 이미지 – charan