Hi, I am using the below function to read csv file. Recently noticed this issue. I did not know why its happening.. is it related to eof reason or any other reason? When the csv file end of the row is only "F" its not returning by the function. When the empty para or the text para is given to the next line of "F", its returned. Why its happening?? is there is any reason... How to handle this case? CSV : Empty Next Line (or) next line with contents: Empty next line: Next line is bold: Code: function readFiles(filStr,fileFlag,column1,column2,column3,column4,columnArr){ var readFil = File(filStr); var rCnt = 0; if(!readFil.exists){ return false; }else{ var fileContnts = ""; readFil.open("r"); if(fileFlag == "TXT"){ fileContnts = readFil.read(); }else{ while(readFil.eof==false){ try{ zRead=readFil.readln(); var csvR = zRead.split(","); if(rCnt != 0){ column1.push(csvR[columnArr[0]]); column2.push(csvR[columnArr[1]]); column3.push(csvR[columnArr[2]]); column4.push(csvR[columnArr[3]]); rCnt++; } }catch(e){} rCnt = 1; } } readFil.close(); } } Regards, Sudha K
... View more