Bonsoir à tous
j'ai exporté un grid view vers excel:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 Response.Clear() Response.AddHeader("content-disposition", "attachment; filename=FileName.xls") Response.Charset = "" Response.ContentType = "application/vnd.xls" Dim stringWrite As New System.IO.StringWriter() Dim htmlWrite As New HtmlTextWriter(stringWrite) GridView2.RenderControl(htmlWrite) Response.Write(stringWrite.ToString()) Response.End()je veux ajouter une ligne au dessus pour écrire le titre du tableau dans mon fichier excel
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 Public Overrides Sub VerifyRenderingInServerForm(ByVal control As System.Web.UI.Control) End Sub
comment le faire
Partager