10 Replies Latest reply on Jan 12, 2018 1:47 PM by LiamDuncan1st

    Importing multiple rows from text file




      I am trying to import multiple (6) rows into a text field from a text file. If i add 2 or more rows it gives me an ouptut of 0. Is there another way to achieve this?


      I have tried this:

      var i;   

      var full;

      for (i = 0; i < 7; i++) {

          full += importTextData("/C/Users/testfile.txt",i);


      event.value = full;


      This only read the 6th row in the file.


      I have also tried this:

      var a = importTextData("/C/Users/testfile.txt",0);



      var b = importTextData("/C/Users/testfile.txt",1);



      var c = importTextData("/C/Users/testfile.txt",2);

      var d = importTextData("/C/Users/testfile.txt",3);

      var e = importTextData("/C/Users/testfile.txt",4);

      var f = importTextData("/C/Users/testfile.txt",5);



      event.value = a+b+c+d+e+f;


      This only outputted the last row in the file.


      Please advise.