Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

XMLPort double quotes

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

  • Suggested answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: XMLPort double quotes

    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.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: XMLPort double quotes

    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.

  • Binesh Profile Picture
    Binesh 7,885 on at
    RE: XMLPort double quotes

    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*;

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: XMLPort double quotes

    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; ?

  • Suggested answer
    Binesh Profile Picture
    Binesh 7,885 on at
    RE: XMLPort double quotes

    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.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: XMLPort double quotes

    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)

  • Suggested answer
    Binesh Profile Picture
    Binesh 7,885 on at
    RE: XMLPort double quotes

    Hello Christopher007,


    See the bellow screenshot. and let me know what you have issue, what you want to change.

    xmlport.png

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: XMLPort double quotes

    The customer wants to use semicolon delimited file, I have suggested 'TAB'.

    Binesh 

    It come in like this with your suggestion.

    Udklip2.PNG

  • Suggested answer
    Amol Salvi Profile Picture
    Amol Salvi 18,694 on at
    RE: XMLPort double quotes

    Try to use 'TAB' delimited  file

  • Suggested answer
    RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: XMLPort double quotes

    As suggested by Binesh try once and the semicolon in both the values i.e. Field Delimiter and Field Separator

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans