Uzumaki
14 years agoOccasional Contributor
CSV file readline
Hi,
When reading line by line from a text (csv) file rows are cut in half and sometimes skipped all together. See below for code. I ahve also attached a sample .csv file.
What am I missing?
function ReadLineSucks(path)
{
var CSVFile = aqFile["OpenTextFile"](path, aqFile.faRead, aqFile.ctANSI);
var row;
while(!CSVFile.IsEndOfFile())
{
row = CSVFile["ReadLine"]();
Log["Message"](CSVFile["Line"]);
Log["Message"](row);
}
CSVFile["Close"]();
}
/Joakim
When reading line by line from a text (csv) file rows are cut in half and sometimes skipped all together. See below for code. I ahve also attached a sample .csv file.
What am I missing?
function ReadLineSucks(path)
{
var CSVFile = aqFile["OpenTextFile"](path, aqFile.faRead, aqFile.ctANSI);
var row;
while(!CSVFile.IsEndOfFile())
{
row = CSVFile["ReadLine"]();
Log["Message"](CSVFile["Line"]);
Log["Message"](row);
}
CSVFile["Close"]();
}
/Joakim