Vb.net 如何将文本或图像添加到从datagrid读取的Excel中
我正在使用下面的代码,工作正常,我只想在DataGrid数据之前向Excel工作表添加自定义文本或图像Vb.net 如何将文本或图像添加到从datagrid读取的Excel中,vb.net,excel,Vb.net,Excel,我正在使用下面的代码,工作正常,我只想在DataGrid数据之前向Excel工作表添加自定义文本或图像 Response.Clear() Response.AddHeader("content-disposition", "attachment;filename=TabelDetails.xls") Response.Charset = "" Response.Cache.SetCacheability(HttpCacheability.NoCache) Response.Content
Response.Clear()
Response.AddHeader("content-disposition", "attachment;filename=TabelDetails.xls")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.ContentType = "application/vnd.xls"
Dim stringWrite As StringWriter = New StringWriter()
Dim htmlWrite As HtmlTextWriter = New HtmlTextWriter(stringWrite)
Me.datagrid.RenderControl(htmlWrite)
Response.Write(stringWrite.ToString())
Response.End()
“在数据网格数据之前”是什么意思?在将数据加载到datagrid之前,是否要显示动画gif图像或一些“加载文本…”?Hi@coder。我的意思是,现在我正在把数据网格中的任何东西都放到excel文件中。我只想在datagrid数据之前的行上添加一个文本(合并、居中并在datagrid数据之前的行上添加文本)。如果我能将图像添加到中心(在我的数据之前的行上),那也会很神奇。