1 Reply Latest reply on Jul 3, 2008 8:10 PM by (xbytor)

    Hi how to edit the text content in CSV

    subhaoviya Level 1
      Hi,
      I need to edit the text content in CSV using java script.

      The content goes like this..........

      "missing image No"
      need to replace "No" by "Yes"

      Thanks in advance
        • 1. Re: Hi how to edit the text content in CSV
          Level 1
          > I need to edit the text content in CSV using java script.

          Something like this work. I haven't tested it but it pretty close :)

          var file = new File("~/somefile.csv");
          file.open("r");
          file.close();

          var str = file.read();
          var nstr = str.replace(/\bNo\b/g, 'Yes');

          file.open("w");
          file.write(nstr);
          file.close();


          -X