I am using data variables from a csv file in my collection.
some of my variables are strings containing a comma
e.g.
column1,column2,column3
data1,“data2,with comma”,data3
when I try and load this into my collection I this error:
Error reading data file: Error: Each row must have an equal number of columns.
I thought that wrapping the string in double quites would work but it doesn’t seem to
Is there a way to include strings with commas in a csv data file?
That seems a bit dodgy - if you have a cvs file and an environment set the you use quote marks in a column to make sure the environment variable isn’t used…
I would have quoted the whole string too and then gone and used a different tool when I found that didn’t work - is this documented as the escape method?
Suggested method doesnt work in Newman. The app gives back an error for ‘Canada"," Toronto string’. Currently I have found the only way to pass comma to newman in data file by json file^
It is failing because you are using slanted double quotes instead of the unidirectional double quotation marks. Therefore, you do not need to only surround the comma in question; you may do as you did before but with the proper quotes.