2 Replies Latest reply on Dec 12, 2008 10:01 AM by WorldDrknss

    CSV Files

      I know that Flex does not have a great CSV parser like PHP, in fact Flex does not have one. Anyways I have built a simple one, but there are still some issues with it. Parsing CSV files within flex requires the use of split() which does not perform as well as it should. I will provide some examples.

      Example CSV: 10000,99,Home
      Will parse correctly as item[0] = 10000 item[1] = 99 and item[2] = Home
      In this case the split option works as expected.

      Example 2 CSV: 10000,99,"Home, Colorado"
      This will parse incorrectly as item[0] = 10000 item[1] = 99 item[2] = "Home
      In which it should read item[0] = 10000 item[1] = 99 item[2] = "Home, Colorado"

      Anyone who can provide a working example for "Example 2" without doing a join (eg: item[2] + item[3]) would be a life saver.