CSV Reports
RemoveColumnNameSpaces Property
Example 



KellermanSoftware.CsvReports Namespace > CsvReader Class : RemoveColumnNameSpaces Property
Any spaces in header column names are removed. The default is true.
Syntax
Public Property RemoveColumnNameSpaces As Boolean
Dim instance As CsvReader
Dim value As Boolean
 
instance.RemoveColumnNameSpaces = value
 
value = instance.RemoveColumnNameSpaces
public bool RemoveColumnNameSpaces {get; set;}
public:
property bool RemoveColumnNameSpaces {
   bool get();
   void set (    bool value);
}
Example
CsvReader csvReader = new CsvReader(); //Trial Mode
//CsvReader csvReader = new CsvReader("place user name here", "place license key here"); //License Mode
 
csvReader.RemoveColumnNameSpaces = true;
string csvString = "First Name,Last Name\r\nJohn,Smith";
 
List<Dictionary<string, string>> result = csvReader.CsvStringToDictionary(csvString);
 
//The column name will be FirstName since the spaces are removed
Console.WriteLine(result[0]["FirstName"]);
Dim csvReader As New CsvReader() 'Trial Mode
'CsvReader csvReader = new CsvReader("place user name here", "place license key here"); //License Mode
 
csvReader.RemoveColumnNameSpaces = True
Dim csvString As String = "First Name,Last Name" & vbCrLf & "John,Smith"
 
Dim result As List(Of Dictionary(Of String, String)) = csvReader.CsvStringToDictionary(csvString)
 
'The column name will be FirstName since the spaces are removed
Console.WriteLine(result(0)("FirstName"))
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