Problem with .csv file in XMLport

poppins
Member Posts: 647
Hi everyone,
I am trying to import some data from a .csv file into a table I created using an XMLport.
I setup the XMLport as following:
When running it, I get the result in the following image:
What shall I do?
I am trying to import some data from a .csv file into a table I created using an XMLport.
I setup the XMLport as following:
Format : Variable Text FieldDelimiter : <"> FieldSeparator : <,> RecordSeparator : <<NewLine>>
When running it, I get the result in the following image:
What shall I do?
0
Answers
-
Check the import file, a missing double quote at the start of the line would probably cause the issue you are getting.0
-
Kishorm wrote:Check the import file, a missing double quote at the start of the line would probably cause the issue you are getting.
You cannot enter 'Bicyclette' in Decimal.
0 -
You'll need to show how the xmlport is setup (fields being imported) and what is in the data file.0
-
Kishorm wrote:You'll need to show how the xmlport is setup (fields being imported) and what is in the data file.
0 -
I would expect an error in the unit price field as it contains a strange/invalid character in it, but I wouldn't expect he error message you are getting. Try correcting the data for the unit price and see if it works.0
-
Actually, I've just realised that the data you have shown is in Excel. Try opening the file in notepad.exe - you'll see that it is different with extra double quotes around each field and also at the start and end of each line.
Best thing is to create a new data file in notepad - do this by highlighting and the copying (ctrl+c) the data in Excel and then pasting into notepad. Also, make sure the unit price does not have the strange character in it - it should work then.0 -
Kishorm wrote:I would expect an error in the unit price field as it contains a strange/invalid character in it, but I wouldn't expect he error message you are getting. Try correcting the data for the unit price and see if it works.
now I am getting the following error:The length of the string is 44, but it must be less than or equal to 20 characters. Value: """1000"",""Bicyclette"",""F4"",""4000,00"""
0 -
Please refer to previous post0
-
Kishorm wrote:Please refer to previous post
"1000","Bicyclette","F4","4000,00" "1001","Bicyclette de randonnee","F5","4000,00"
I tried to run the XMLport and got the following error:The length of the string is 34, but it must be less than or equal to 20 characters. Value: "1000","Bicyclette","F4","4000,00"
0 -
I figured it out
Infact, I replaced the settings of the XMLport as following:Format : Variable Text FieldDelimiter : " FieldSeparator : , RecordSeparator : <NewLine>
and it did worked...
I've tried that before but it didn't work since I was using an Excel file instead of a Text file...
Thank you for pointing that out to me0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions