CSV File
-
Hi Friends, How to retreive values from .CSV file in C#.Please help me how to do. Thanks & Regards Senthil Kumar.T.S
-
Hi Friends, How to retreive values from .CSV file in C#.Please help me how to do. Thanks & Regards Senthil Kumar.T.S
File.ReadAllText and then the split method to split the string on the , so you get an array of values to parse.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Hi Friends, How to retreive values from .CSV file in C#.Please help me how to do. Thanks & Regards Senthil Kumar.T.S
In addition to what CG said, there are quite a few libraries that do this. If you want to do it yourself, make sure you handle cases like the items being enclosed in double quotes. I always do that so I can have spaces and other special characters (including the comma itself) in my items.
Cheers, Vikram.
The hands that help are holier than the lips that pray.
-
File.ReadAllText and then the split method to split the string on the , so you get an array of values to parse.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Hi Christian Graus, Can you give me a example? Please?
-
Hi Friends, How to retreive values from .CSV file in C#.Please help me how to do. Thanks & Regards Senthil Kumar.T.S
-
In addition to what CG said, there are quite a few libraries that do this. If you want to do it yourself, make sure you handle cases like the items being enclosed in double quotes. I always do that so I can have spaces and other special characters (including the comma itself) in my items.
Cheers, Vikram.
The hands that help are holier than the lips that pray.
Hi Friends, Can you tell me how to connect .CSV file with C# and retreive the values.As CG said by File.ReadAllText we can split the string and get the method.Can give me a example code so that i can get an idea, because i searched in google but i can't get the solution. Thanks & Regards Senthil Kumar.T.S
-
Intrestingly you can use ADO.Net to deal with reading CSV files. http://weblogs.asp.net/fmarguerie/archive/2003/10/01/29964.aspx[^]
Thanks Laddie Kindly rate if the answer was helpful
There is a special CSV reader too for Ado.Net A Fast CSV Reader[^]
Giorgi Dalakishvili #region signature my articles #endregion