How to import/export csv files in the RTC

maris2000
Member Posts: 71
Can anyone tell me how to import/export csv files in the RTC.
I know that I have to use XMLport, and I have tried but it's not working.
Can you please explain how to do this properly, or give an example.
I know that I have to use XMLport, and I have tried but it's not working.
Can you please explain how to do this properly, or give an example.
0
Answers
-
What does it mean "and I have tried but it's not working"? Some errors? Or you do not know how to run the XMLPort? Is the file you want to import on the service tier machine?0
-
ups, sorry. I don't know what I was thinking yesterday.
Well, first of all I am just trying with a very simple exsample for exercise.
I have created XMLport based on "Post Code" table, and I need I to work both ways(import/export).
The XMLport should export/import data as csv file.
I have changed the Format property to "Variable Text" and when I run the XMLport data is exported in XML format.
I don't know how to make the XMLport to act as dataport.
Do I have to change some other properties or add some code to XMLport?
I was searching the web for an example or an explanation on this, but could find anything.
Would you be kind enough to explain me what I am doing wrong or maybe give an example.0 -
The XMLPort itself have no request form. You need to call it through XMLPORT.IMPORT or XMLPORT.EXPORT where you are passing the InStream or OutStream to the file you want to use.0
-
I did this but the data in csv file is in xml format. I thought that I would get csv file.
IF ISCLEAR(FileSystem) THEN CREATE(FileSystem); FilePath := 'C:\'; IF NOT FileSystem.FolderExists(FilePath) THEN FileSystem.CreateFolder(FilePath); IF EXISTS(FilePath + 'PostCode.csv') THEN ERASE(FilePath + 'PostCode.csv'); TestFile.CREATE(FilePath + 'PostCode.csv'); TestFile.CREATEOUTSTREAM(TestStream); XMLPORT.EXPORT(50000, TestStream); TestFile.CLOSE;
0 -
1) Check again that the property Format of the xmlport is set correctly
2) Are you trying it from CC or RTC?0 -
By the way I am testing xmlport on classic client just to see if it works as supposed to(exporting csv file), but it is not.
and format property is set to variable text.0 -
I am afraid that the XMLPort as Dataport behave only when running on Service tier, it means when it is started from RTC. For CC you still need to use dataports (but this is just my expectation right now).0
-
So I have to try from RTC now.
I thougt that if format property is set to variable text, XMLport would act as dataport on CC too. :oops:0 -
Kine you have right.
thank you:)
It works from rtc.
I don't know why in the world I didn test from CC first. this was very stypid of me.
tanx again, tankt you all.
I love Mibuso :P0 -
-
maris2000 wrote:I love Mibuso :PNo support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
Hi all,
I am facing the same problem which is as follows:
I want to import data in RTC using XML Port. For that I want to use either CSV file or Excel File.Using CSV File I am not able to import data in RTC.
How can I import Data in RTC from Excel or CSV file ? (If Possible then Please Provide me example)
Is there any other option to Import data in RTC ?
Please Guide me.
With Best Regards
Dipak Patel0 -
hi, trying to use Maris' code above but NAV doesn't recognize "filesystem." How does that need to be initialized? It appears to want an automation object...
Thanks,
Chandler0
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