1 2 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
|
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim boucleInterne As Integer = 0
Dim ContenuLigne As String = ""
Dim CompteurIndice As Integer = 0
Dim LongueurLigne As Integer = 0
Dim f As New StreamReader("essai.txt")
Do Until f.Peek = -1
Dim d As String = f.ReadLine
Dim c() As String = d.Split(Chr(13) + Chr(10))
For i As Integer = 0 To UBound(c)
BindingNavigatorAddNewItem.PerformClick()
ContenuLigne = c(i)
Dim tableau() As String = ContenuLigne.Split(",")
For boucleInterne = 1 To 3
ContenuLigne = tableau(boucleInterne - 1)
ContenuLigne = ContenuLigne.Replace("""", "")
tableau(boucleInterne - 1) = ContenuLigne
Table1DataGridView(boucleInterne - 1, CompteurIndice).Value = tableau(boucleInterne - 1)
Next
CompteurIndice = CompteurIndice + 1
Next
Loop
Table1BindingNavigatorSaveItem.PerformClick()
End Sub |
Partager