| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 
 |  
Public Class WebForm1
    Inherits System.Web.UI.Page
 
#Region " Code généré par le Concepteur Web Form "
 
    'Cet appel est requis par le Concepteur Web Form.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
 
    End Sub
 
    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN*: cet appel de méthode est requis par le Concepteur Web Form
        'Ne le modifiez pas en utilisant l'éditeur de code.
        InitializeComponent()
    End Sub
 
#End Region
 
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Placez ici le code utilisateur pour initialiser la page
 
        Try
            Dim mtable As New ArrayList()
            mtable = chargeliste()
            Dim MaLigne As DataRow
            Dim Temp As String
            Dim i As Integer = 0
 
            Temp = "<TABLE BORDER=1><TR>"
            Temp &= "<TD><B>Nom Prenom</B></TD>"
            Temp &= "<TD><B>Service</B></TD>"
            Temp &= "<TD><B>Localite</B></TD>"
            Temp &= "<TD><B>Telephone</B></TD>"
            Temp &= "<TD><B>Poste</B></TD>"
            Temp &= "<TD><B>Email</B></TD>"
            Temp &= "</TR>"
            For i = 0 To mtable.Count - 1
                Temp &= "<TR>"
                Temp &= "<TD>" & mtable.Item(i) & "</TD>"
                Temp &= "</TR>"
            Next i
            Temp &= "</TABLE>"
            ' Temp = ZfStringUtil.SupprimeAccent(Temp)
            HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Default
            HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"
            'HttpContext.Current.Response.ContentType = "application/msword"
            HttpContext.Current.Response.Write(Temp)
        Catch
 
        Finally
        End Try
 
 
    End Sub
 
    Function chargeliste()
        Dim t As New ArrayList()
 
        t.Add("aaa richard")
        t.Add("aaa anthony")
        t.Add("aaa zorgax")
 
        Return t
 
    End Function
 
End Class | 
Partager