Click here to Skip to main content
15,920,383 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to read a .csv file in .net using c# and display it in web page
Posted

Read it line by line and parse each line using
C#
string[] elements =
    line.Split(new char[] {' ', ';', ',', '\t', }, System.StringSplitOptions.StringSplitOptions);


The delimiters may vary, but the idea is to split by some set of delimiters, no matter which ones are used in each case.

—SA
 
Share this answer
 
v2
Comments
Prasad_Kulkarni 26-Jun-12 2:27am    
To the point! +5!
Sergey Alexandrovich Kryukov 26-Jun-12 2:54am    
Thank you, Prasad.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900