I have made a XMLPort which import some data from CSV file which is semicolon seperated.
I works fine, until the use of double quotes in the csv file. Then it will divide it into 3 fields.
This is what it looks like in excel before save as
MS "Foo Luna" (ex Foo Sky).
The CSV file looks like this when opened in note
66848;31.08.2016;"MS ""Foo Luna"" (ex Foo Sky)";89870900594;
How do I work around this, so i can insert it so after insert is still with double quotes?
*This post is locked for comments
You can also open the .CSV file in Excel, do whatever needed mass changes to the data and save it back to .CSV using whatever separators you would need.
Ok that could work, but then I would have to receive the file like the example you gave. Is it something you can do with a excel file, if then how?
The need is only for import, so I dont export the data.
IF you didn't give delimiter then it takes default "
so give delimiter Like * and separator ; so your data look like:
*66848*;*31.08.2016*;*MS "Foo Luna" (ex Foo Sky)*;*89870900594*;
I am not using FieldDelimiter as a "
I use semicolon. 66848;31.08.2016;"MS ""Foo Luna"" (ex Foo Sky)";89870900594;
Maybe there is a way to save the without adding the extra double quotes to the csv file? so the CSV file is like this
66848;31.08.2016;MS "Foo Luna" (ex Foo Sky);89870900594; ?
Hello,
Look if in your data " double quote is there then you can't use FieldDelimiter as a " Double quote, because system whenever found " double quote then it terminate for next.
Tell to customer export data as some other delimiter that delimiter is not exist in actual data Like- ; OR * OR any special symbol that are not exist in actual data.
and based on csv create Xmlport and now Import/Exort, so you won't get any exception.
Hi Binesh,
The customer wants to use semicolon seperator.
Issue is the customer name is the following - MS "Foo Luna" (ex Foo sky)
When i import it from CSV file it gets like this - "MS""Foo Luna"" (ex Foo Sky)"
or it get devided into 3 fields - MS - Foo Luna - (ex Foo sky).
Can I get it into NAV with semicolon seperator and still look like this MS "Foo Luna" (ex Foo sky)
Hello Christopher007,
See the bellow screenshot. and let me know what you have issue, what you want to change.
The customer wants to use semicolon delimited file, I have suggested 'TAB'.
It come in like this with your suggestion.
Try to use 'TAB' delimited file
As suggested by Binesh try once and the semicolon in both the values i.e. Field Delimiter and Field Separator
Sohail Ahmed
2
mmv
2
Amol Salvi
2