Visual Basic How do I read a CSV file and display the values in a datagrid?
问题 I'm using VB 2005, how do I open a CSV file and read the columns/rows and display the values in a datagrid? CSV file example: jsmith,jsmith@hotmail.com I then want to perform an action on each row i.e. each user, how would I do this? I'm a newbie as you can tell but happy to learn. Thanks 回答1: Use the TextFieldParser that's built into VB.NET. Google found me this example Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser _ ("C:\test\info.csv") 'Specify that reading from a