how to import/export csv files in the RTC

Can anybody explain how to import/export csv files in the RTC.

I know that I should use XMLports to do that. I have tried with an example, but didn’t work.

You probably need to explain what error you are getting using the XML port.

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.

I would recommend looking at standard XML port 5050. This is a text import export object

yep, I did that, and I have set the same properties in my XMLport.

I test the xmlport in classic client to see if it exports csv file.


FilePath := 'C:\';

IF NOT FileSystem.FolderExists(FilePath) THEN

IF EXISTS(FilePath + 'PostCode.csv') THEN
ERASE(FilePath + 'PostCode.csv');

TestFile.CREATE(FilePath + 'PostCode.csv');

XMLPORT.EXPORT(50000, TestStream);

but the data in csv file has xml format.

It works, thanx.

I made big mistake by testing the XMLport from CC, which was very stypid of me.

But from RTC XMLport acts as dataport.

Thanx again for your assistance

Hi Maris,

Just wondering if the Import side to your XMLPort worked? I’ve followed this thread and created a simple import/export XMLPort for a .csv file also. The export works fine when run through the RTC. However, trying to import the same file back doesn’t work, plus it deletes all the content from the .csv file each time??

Any idea’s?

I am sorry but I have no idea. My import/export worked fine.


Just quick guess:
when you exported first, and immediately tried to import back the same data, maybe you simply got PrimaryKey violation, as these records already exist in table? Which table you played with?

Thanks guys. Sorted it out. Dumbass that I am, I fell into the oul copy & paste trap. I had File.Create(…) for my import, instead of File.Open(…) !

Thanks again.

Are you Mark Kinsella? Is that related to this one?

There is a problem using XMLport with Application Server. It behaves like CC and the file format will be xml.

Our accountant is asking to have and XMLport setup to allow him to import data, where do I start to create the XMLport in RTC. I have setup a dataport in classic for him, but he is having issues. Would like to use RTC, but need some guidance on where to start. I feel confident on building it, but again, confused on where to start.

Hello all,

Is there any idea on importing it looks like: if any record get problem on importing just escape that record and other records are imported on the system.

I know this post is old, but I’m running into the issue now and haven’t found a work around yet. Can you tell me whether or not this was fixed or if you found a workaround?

Thanks so much!!