CSV files with commas in data
Sometimes CSV data includes commas or other characters within the data that results in processing errors. For example, an address field with a comma can throw off the fields even if the field has quotes around it. The following text is interpreted as six fields instead of five:
Minisoft,"1024 First Street, Suite 311",Snohomish,WA,98290
One way to handle this is to add a Replace preprocessor to the project to change all occurrences of “, ” (comma-space) to some other string. This example changes “, ” to ” – ” (space-hyphen-space). The text processed by the CSV parser then handles the data as expected:
Minisoft,"1024 First Street - Suite 311",Snohomish,WA,98290
Complete the following steps to add a Replace preprocessor to your eFORMz project file:
- Start the eFORMz Composer and open the eFORMz project file.
- Right click the project name in the Project window > Add Preprocessor > Replace occurrences of a string.
- In the Search for field, type the characters comma-space (, ). In the Replace with field, type the characters space-comma-space ( – ).
- Click OK and save the project. The updated project is picked up the next time that the project is called.
Read more about importing CSV records.