Read Value From CSV

Hi Experts,

I have a requirement where I need to read the number from a CSV file where delimiter is "," and value is also containing comma in it. also the value is in double quotes Kindly suggest how I can read it.

sample value "123,456,789", this value is stored as text in the file but I need to read it as number in Appian.

Thanks,

Gaurav Singh

  Discussion posts and replies are publicly visible

Parents
  • Hi Gaurav - are you saying ALL of the values in your CSV file will be contained in double quotes? e.g.:

    "Apple","123,456,789","Banana","987,7654,321"

    One option would be to format the data by:

    1. splitting the data using the combination of quote and comma as the delimiter
    2. stripping out all of the remaining quotes so your data is now an array of their basic values

    ...and then, assuming you can always be sure that an item will be a number based upon its position in the array, cast it from text to integer (or decimal)

  • Hi Stewart,

    Values are like: Name,Month,Value,test1,05,"123,452,46.05",test2,06,"123,321,46.05"

    Where Name,Month,Value are the column headers. which contains data in 2 rows: test1,05,"123,452,46.05" and test2,06,"123,321,46.05" in respective columns

    Thanks,

    Gaurav Singh

Reply Children