CSV Reports
CsvStringToStringList Method
Example 



KellermanSoftware.CsvReports Namespace > CsvReader Class : CsvStringToStringList Method
A CSV string
Read a CSV String and return a list of rows and columns
Syntax
Public Function CsvStringToStringList( _
   ByVal csvString As String _
) As List(Of List(Of String))
Dim instance As CsvReader
Dim csvString As String
Dim value As List(Of List(Of String))
 
value = instance.CsvStringToStringList(csvString)
public List<List<string>> CsvStringToStringList( 
   string csvString
)
public:
List<List<String^>^>^ CsvStringToStringList( 
   String^ csvString
) 

Parameters

csvString
A CSV string

Return Value

A list of list strings
Example
CsvReader csvReader = new CsvReader(); //Trial Mode
//CsvReader csvReader = new CsvReader("place user name here", "place license key here"); //License Mode
 
//Parameters
string csvString = "Name,Birthdate\r\nJohn,5/30/2013";
 
List<List<string>> results = csvReader.CsvStringToStringList(csvString);
 
//Write out the first column name in the header
Console.WriteLine(results[0][0]);
 
//Write out the first column value in the first row
Console.WriteLine(results[1][0]);
Dim csvReader As New CsvReader() 'Trial Mode
'Dim csvReader As New CsvReader("place user name here", "place license key here") 'License Mode
 
'Parameters
Dim csvString As String = "Name,Birthdate" & vbCrLf & "John,5/30/2013"
 
Dim results As List(Of List(Of String)) = csvReader.CsvStringToStringList(csvString)
 
'Write out the first column name in the header
Console.WriteLine(results(0)(0))
 
'Write out the first column value in the first row
Console.WriteLine(results(1)(0))
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

CsvReader Class
CsvReader Members