我嘗試在我的C#winform程序中導入csv文件到我的數據庫。幫助inport csv文件到我的C#程序
例如csv文件:
code ,name ,price
101010,computer,200$
,我做到了這一點:
char[] BI = { ',' };
string[] WI = TEMP.Split(BI);
A = WI[0].Trim().ToString();
B = WI[1].Trim().ToString();
C = WI[2].Trim().ToString();
,但我能做些什麼,如果名字中含有(,)?
例如
code ,name ,price
101010,computer 12,200.00,200$
,如果我得到這種類型的CSV:
code ,name ,price
"101010","computer 12,200.00","200$"
如何面對呢?
+1我使用這個,一個很好的快速庫 – 2010-12-14 19:33:27
我使用CsvReader時,Filehelpers有問題。 – 2010-12-14 20:53:37
@Scott,那會是什麼問題,最好是向作者彙報? – 2010-12-16 21:10:32