Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20990

Why Dots are replaced by '#' when getting column names from csv file

$
0
0

Does anybody know, why "." is replaced by "#" when getting column names from CSV file?

 

I have WPF grid which is empty by default and it is possible to add columns with names as specified in Schema.ini:

[Myfile.csv]

Format=CSVDelimited

ColNameHeader=True
MaxScanRows=0

Col1=Product Text
Col2="Price Abs. Change" Double

 

And I have the following function to add these columns which is working OK: 

function PopulateColumnsFromFile(FileName) {

var CSV = DDT.CSVDriver(Project.Path + "\\Data Files\\" + FileName + ".csv");
var i = 0;
for (i = 0; i < CSV.ColumnCount; i++) {
AddColumn();
ChooseColumn(CSV.ColumnName(i).replace("#", "."));
}
DDT.CloseDriver(CSV.Name);
}

 

 

So initially CSV.ColumnName(i) brings me "Price Abs# Change" instead of "Price Abs. Change".

The question is why "." sign is seen like "#" sign, and I have to use '.replace("#", ".")' to get correct value of column name? Any links to the answer would be appreciated.


Viewing all articles
Browse latest Browse all 20990

Trending Articles