Dataport fields w/ "

Hi all, I am trying to get a dataport working right. Some values of the dataport field contain double-quote character ("). And this is annoying. When I convert the data from excel sheet to csv file, these values started to have double quotes around. For example: 3L #6835-12 3.5" DISK LABEL HO in Excel becomes “3L #6835-12 3.5"” DISK LABEL HO" in csv. Now, the dataport seems to be confused and started to assume more fields. It is proven that when I replace the " with some other characters, the dataport runs fine. And, for info, I was trying to import from the csv file. Does anyone know how in the dataport can I work around the " characters? Thanks for any help. Regards, Hadi Lai

Have a look at the properties FieldStartDelimiter and FieldEndDelimiter.

This is a common problem importing data. Another solution is to use XL to search/replace all " with, for example, ~ or with nothing at all.

When preparing data in Excel I always save the file as tab delimited and set my dataport properties to have no field start and field end delimeters and TAB as the field separator.

One possibility is to read the file record by record (line by line) into a variable and then split it up manually - doing this you can build in some logics yourself (e. g. if no comma right after quote-mark then qutoemark is part of field) - search for next quotemark. You may have problems if a field contains quote-mark followed by a comma: “3L #6835-12 3.5", DISK LABEL HO”… [B)]

When you have complex data like this to convert, then best solution is to use a more comlex start end delimiter. These do not have to be a single charachter, eg… Use $#$ as the start end delimiters (instead of the " ), and Use $,$ as the field delimiter (instead of , ) This will make the fiel larger, but musch easier to handle