Dim?fileName?As?String?=?"E:\User?Documents\Master\My?Documents\電子閱讀\股票\table2.csv"
Using?Recrods?As?New?Microsoft.VisualBasic.FileIO.TextFieldParser(fileName)?'建立TextFieldParser對象
'MyReader.TextFieldType?=?FieldType.Delimited
Recrods.SetDelimiters(",")?'把字段分隔符設置為","
Dim?curRow()?As?String
Do?Until?Recrods.EndOfData
curRow?=?Recrods.ReadFields()?'讀取記錄行,返回字符串數組,所以不同字段類型需要自己轉換。
Debug.Print(Join(curRow,?vbTab))
Loop
End?Using
End?Sub