Announcement

Collapse
No announcement yet.

writeToFile.efs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • writeToFile.efs

    Hi

    Lets say I want to read this file

    .....
    (Fri) 1/ 9/2004 1:05am Moon (Leo) SSq [Vir] Jupiter
    (Fri) 1/ 9/2004 4:46am Moon (Leo) Ses (Sag) Pluto
    (Fri) 1/ 9/2004 11:03am Moon (Leo) SSx [Can] Saturn
    (Fri) 1/ 9/2004 4:33pm Moon (Leo) Ses (Sag) Mercury
    (Fri) 1/ 9/2004 4:39pm Moon (Leo) Opp (Aqu) Neptune
    (Fri) 1/ 9/2004 6:59pm Sun (Cap) Tri [Vir] Jupiter
    (Fri) 1/ 9/2004 7:46pm Venus (Aqu) Ses [Can] Saturn
    (Fri) 1/ 9/2004 7:52pm Mercury (Sag) SSq (Aqu) Neptune

    ....

    from a csv text file or spreadsheet and I want to plot some markers or labels into the past and future onto my chart. i.e,



    Can anyone help get me started please?

    Thanks

    Gary
    Buy the dips sell the rallies

  • #2
    Gary,

    Assuming you want this information as strings

    var a = new Array()
    var f1 = new File("Gary.txt");
    if(f1.exists()) {
    f1.open("rt");


    while(!f1.eof()) {
    ss = f1.readln();
    dValue = ss.split(" ");//your data is space delimited
    a.unshift(dValue);
    }
    f1.close();
    }


    Then, when you refer to a[0][0] you will have (Fri)

    a[2][2] would be 11:03am, and so on

    I did not run this to ensure it all works perfectly, but it is pretty close, try putting something together and send me a note on the BB if it does not work out. Remember to use plenty of debugPrintln statements to troubleshoot

    Comment

    Working...
    X