9 Replies Latest reply on Mar 1, 2007 8:56 AM by 807606

    CSV file - how to eliminate the comma?

    800340
      Hi there,

      I have a CSV file with the following data (example)

      id company Value
      883 IBM 45
      323 MS 44
      933 Oracle 63
      223 Gannett Co., Inc. 33

      when I read it with:
      while((line = bufRdr.readLine()) != null)
      {                                   
           StringTokenizer st = new StringTokenizer(line,",");
           CSVPruductionContent csv = new CSVPruductionContent();
      }
      I get an error on the value with Gannett Co., Inc. because it has a comma in the word Gannett Co., Inc

      is there anyway to ignore the comma and not consider it as a separated value?

      Any idea?