Hello,
I want to read comma separeted file. I am able to read comma separeded file with string tokenizer but if there are spaces between string line it throw exception.
example: 1,2,asd,sdf,e,f,j,t,7
I can save it and open it (from listcontrol to .csv file and vice-versa). But if string is = 1,2, ,sdf,e,f, , ,7
If there are spaces between stringline, I can save it into .csv file but can not open it into listcontrol.
if( File.Open(fileDlg.GetFileName(), CFile::modeRead))
{
while(File.ReadString(strLine)) {
int total = (int)m_Events.GetItemCount();
while(strLine.Tokenize(Seperator, Position)!="")
{
for ( int ii=0; ii<total;> {
int Position = 0;
Token = strLine.Tokenize(Seperator, Position);
for(int j=0; j<=17;j++)
{
m_Events.SetItemText(ii,j,Token);
Token = strLine.Tokenize(Seperator, Position);
}
File.ReadString(strLine);
}
}
}
}
Thank you.