09-06-23, 04:30 PM
كود :
Imports Microsoft.VisualBasic.FileIO
Module Program
Sub Main()
Dim filePath As String = "C:\path\to\your\file.csv"
Using parser As New TextFieldParser(filePath)
parser.TextFieldType = FieldType.Delimited
parser.SetDelimiters(",")
While Not parser.EndOfData
Dim fields As String() = parser.ReadFields()
' Process the fields of each row
For Each field As String In fields
Console.Write(field & vbTab)
Next
Console.WriteLine()
End While
End Using
Console.ReadLine()
End Sub
End Module
