RFC 4180対応版 CSVレコードの分解
Posted feedbacks - VB.net
.NET Framework 2.0 以降でのみ使用可能です。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Imports Microsoft.VisualBasic.FileIO
Module CSVParser
Sub Main()
Dim p As New TextFieldParser(Console.OpenStandardInput())
p.SetDelimiters(",")
p.HasFieldsEnclosedInQuotes = True
While Not p.EndOfData
Dim i As Integer = 0
For Each col As String In p.ReadFields()
i = i + 1
Console.WriteLine("{0} => {1}", i, col)
Next col
End While
End Sub
End Module
|


raynstard
#3389()
Rating1/1=1.00
[ reply ]