[問題] parse a CSV file by C#

看板C_Sharp作者 (imio)時間17年前 (2009/03/08 03:45), 編輯推噓2(201)
留言3則, 3人參與, 最新討論串1/1
hey everyone, how can i read and parse the value of cell from a CSV file by visual 2005 column by column if cells contains comma(,), space( ) or double quot(""). i tried to use, readline() and split(',') a string but if cells contain comma then it spilts into 2 object which is not what i want.btw the precondition is that i cannt change anything about imported CSV file. thank you everyone -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 24.191.101.238

03/08 16:41, , 1F
Try Regular Expression。
03/08 16:41, 1F

03/08 23:04, , 2F
ADO.NET
03/08 23:04, 2F

03/10 16:21, , 3F
自己寫就好了 我就寫一個了(純拆字串的方式)
03/10 16:21, 3F
文章代碼(AID): #19iixerQ (C_Sharp)